|
| 1 | +// Licensed to the .NET Foundation under one or more agreements. |
| 2 | +// The .NET Foundation licenses this file to you under the MIT license. |
| 3 | +// See the LICENSE file in the project root for more information. |
| 4 | + |
| 5 | + |
| 6 | +using System; |
| 7 | +using Microsoft.Data.DataView; |
| 8 | +using Microsoft.ML.Data; |
| 9 | + |
| 10 | +namespace Microsoft.ML.Functional.Tests.Datasets |
| 11 | +{ |
| 12 | + /// <summary> |
| 13 | + /// A class for the Iris test dataset. |
| 14 | + /// </summary> |
| 15 | + internal sealed class Adult |
| 16 | + { |
| 17 | + [LoadColumn(0)] |
| 18 | + public bool Label { get; set; } |
| 19 | + |
| 20 | + [LoadColumn(1)] |
| 21 | + public string WorkClass { get; set; } |
| 22 | + |
| 23 | + [LoadColumn(2)] |
| 24 | + public string Education { get; set; } |
| 25 | + |
| 26 | + [LoadColumn(3)] |
| 27 | + public string MaritalStatus { get; set; } |
| 28 | + |
| 29 | + [LoadColumn(4)] |
| 30 | + public string Occupation { get; set; } |
| 31 | + |
| 32 | + [LoadColumn(5)] |
| 33 | + public string Relationship { get; set; } |
| 34 | + |
| 35 | + [LoadColumn(6)] |
| 36 | + public string Ethnicity { get; set; } |
| 37 | + |
| 38 | + [LoadColumn(7)] |
| 39 | + public string Sex { get; set; } |
| 40 | + |
| 41 | + [LoadColumn(8)] |
| 42 | + public string NativeCountryRegion { get; set; } |
| 43 | + |
| 44 | + [LoadColumn(9)] |
| 45 | + public float Age { get; set; } |
| 46 | + |
| 47 | + [LoadColumn(10)] |
| 48 | + public float FinalWeight { get; set; } |
| 49 | + |
| 50 | + [LoadColumn(11)] |
| 51 | + public float EducationNum { get; set; } |
| 52 | + |
| 53 | + [LoadColumn(12)] |
| 54 | + public float CapitalGain { get; set; } |
| 55 | + |
| 56 | + [LoadColumn(13)] |
| 57 | + public float CapitalLoss { get; set; } |
| 58 | + |
| 59 | + [LoadColumn(14)] |
| 60 | + public float HoursPerWeek { get; set; } |
| 61 | + |
| 62 | + /// <summary> |
| 63 | + /// The list of columns commonly used as numerical features. |
| 64 | + /// </summary> |
| 65 | + public static readonly string[] CategoricalFeatures = new string[] { "WorkClass", "Education", "MaritalStatus", "Occupation", "Relationship", "Ethnicity", "Sex", "NativeCountryRegion" }; |
| 66 | + |
| 67 | + /// <summary> |
| 68 | + /// The list of columns commonly used as numerical features. |
| 69 | + /// </summary> |
| 70 | + public static readonly string[] NumericalFeatures = new string[] { "Age", "FinalWeight", "EducationNum", "CapitalGain", "CapitalLoss", "HoursPerWeek" }; |
| 71 | + } |
| 72 | +} |
0 commit comments