{ "data_id": "44740", "name": "robert_seed_2_nrows_2000_nclasses_10_ncols_100_stratify_True", "exact_name": "robert_seed_2_nrows_2000_nclasses_10_ncols_100_stratify_True", "version": 1, "version_label": "4c0a10cc-a1b2-4506-b1c1-8943d4ef87b8", "description": "Subsampling of the dataset robert (41165) with\n\nseed=2\nargs.nrows=2000\nargs.ncols=100\nargs.nclasses=10\nargs.no_stratify=True\nGenerated with the following source code:\n\n\n```python\n def subsample(\n self,\n seed: int,\n nrows_max: int = 2_000,\n ncols_max: int = 100,\n nclasses_max: int = 10,\n stratified: bool = True,\n ) -> Dataset:\n rng = np.random.default_rng(seed)\n\n x = self.x\n y = self.y\n\n # Uniformly sample\n classes = y.unique()\n if len(classes) > nclasses_max:\n vcs = y.value_counts()\n selected_classes = rng.choice(\n classes,\n size=nclasses_max,\n replace=False,\n p=vcs \/ sum(vcs),\n )\n\n # Select the indices where one of these classes is present\n idxs = y.index[y.isin(classes)]\n x = x.iloc[idxs]\n y = y.iloc[idxs]\n\n # Uniformly sample columns if required\n if len(x.columns) > ncols_max:\n columns_idxs = rng.choice(\n list(range(len(x.columns))), size=ncols_max, replace=False\n )\n sorted_column_idxs = sorted(columns_idxs)\n selected_columns = list(x.columns[sorted_column_idxs])\n x = x[selected_columns]\n else:\n sorted_column_idxs = list(range(len(x.columns)))\n\n if len(x) > nrows_max:\n # Stratify accordingly\n target_name = y.name\n data = pd.concat((x, y), axis=\"columns\")\n _, subset = train_test_split(\n data,\n test_size=nrows_max,\n stratify=data[target_name],\n shuffle=True,\n random_state=seed,\n )\n x = subset.drop(target_name, axis=\"columns\")\n y = subset[target_name]\n\n # We need to convert categorical columns to string for openml\n categorical_mask = [self.categorical_mask[i] for i in sorted_column_idxs]\n columns = list(x.columns)\n\n return Dataset(\n # Technically this is not the same but it's where it was derived from\n dataset=self.dataset,\n x=x,\n y=y,\n categorical_mask=categorical_mask,\n columns=columns,\n )\n```", "format": "arff", "uploader": "Eddie Bergman", "uploader_id": 32840, "visibility": "public", "creator": "\"Eddie Bergman\"", "contributor": null, "date": "2022-11-17 18:47:13", "update_comment": null, "last_update": "2022-11-17 18:47:13", "licence": "Public", "status": "active", "error_message": null, "url": "https:\/\/api.openml.org\/data\/download\/22111502\/dataset", "kaggle_url": null, "default_target_attribute": "class", "row_id_attribute": null, "ignore_attribute": null, "runs": 0, "suggest": { "input": [ "robert_seed_2_nrows_2000_nclasses_10_ncols_100_stratify_True", "Subsampling of the dataset robert (41165) with seed=2 args.nrows=2000 args.ncols=100 args.nclasses=10 args.no_stratify=True Generated with the following source code: ```python def subsample( self, seed: int, nrows_max: int = 2_000, ncols_max: int = 100, nclasses_max: int = 10, stratified: bool = True, ) -> Dataset: rng = np.random.default_rng(seed) x = self.x y = self.y # Uniformly sample classes = y.unique() if len(classes) > nclasses_max: vcs = y.value_counts() selected_classes = rng.choice( c " ], "weight": 5 }, "qualities": { "NumberOfInstances": 2000, "NumberOfFeatures": 101, "NumberOfClasses": 10, "NumberOfMissingValues": 0, "NumberOfInstancesWithMissingValues": 0, "NumberOfNumericFeatures": 100, "NumberOfSymbolicFeatures": 1, "PercentageOfBinaryFeatures": 0, "PercentageOfInstancesWithMissingValues": 0, "PercentageOfMissingValues": 0, "AutoCorrelation": 0.09654827413706854, "PercentageOfNumericFeatures": 99.00990099009901, "Dimensionality": 0.0505, "PercentageOfSymbolicFeatures": 0.9900990099009901, "MajorityClassPercentage": 10.45, "MajorityClassSize": 209, "MinorityClassPercentage": 9.6, "MinorityClassSize": 192, "NumberOfBinaryFeatures": 0 }, "tags": [], "features": [ { "name": "class", "index": "100", "type": "nominal", "distinct": "10", "missing": "0", "target": "1", "distr": [ [ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" ], [ [ "198", "0", "0", "0", "0", "0", "0", "0", "0", "0" ], [ "0", "192", "0", "0", "0", "0", "0", "0", "0", "0" ], [ "0", "0", "196", "0", "0", "0", "0", "0", "0", "0" ], [ "0", "0", "0", "199", "0", "0", "0", "0", "0", "0" ], [ "0", "0", "0", "0", "209", "0", "0", "0", "0", "0" ], [ "0", "0", "0", "0", "0", "206", "0", "0", "0", "0" ], [ "0", "0", "0", "0", "0", "0", "197", "0", "0", "0" ], [ "0", "0", "0", "0", "0", "0", "0", "200", "0", "0" ], [ "0", "0", "0", "0", "0", "0", "0", "0", "196", "0" ], [ "0", "0", "0", "0", "0", "0", "0", "0", "0", "207" ] ] ] }, { "name": "V278", "index": "0", "type": "numeric", "distinct": "633", "missing": "0", "min": "0", "max": "900", "mean": "256", "stdev": "197" }, { "name": "V284", "index": "1", "type": "numeric", "distinct": "552", "missing": "0", "min": "0", "max": "898", "mean": "307", "stdev": "240" }, { "name": "V393", "index": "2", "type": "numeric", "distinct": "699", "missing": "0", "min": "46", "max": "872", "mean": "453", "stdev": "181" }, { "name": "V410", "index": "3", "type": "numeric", "distinct": "702", "missing": "0", "min": "22", "max": "884", "mean": "429", "stdev": "193" }, { "name": "V550", "index": "4", "type": "numeric", "distinct": "585", "missing": "0", "min": "38", "max": "837", "mean": "416", "stdev": "138" }, { "name": "V654", "index": "5", "type": "numeric", "distinct": "604", "missing": "0", "min": "60", "max": "841", "mean": "435", "stdev": "150" }, { "name": "V696", "index": "6", "type": "numeric", "distinct": "556", "missing": "0", "min": "0", "max": "898", "mean": "307", "stdev": "238" }, { "name": "V725", "index": "7", "type": "numeric", "distinct": "563", "missing": "0", "min": "0", "max": "898", "mean": "314", "stdev": "236" }, { "name": "V749", "index": "8", "type": "numeric", "distinct": "542", "missing": "0", "min": "0", "max": "899", "mean": "293", "stdev": "257" }, { "name": "V768", "index": "9", "type": "numeric", "distinct": "506", "missing": "0", "min": "82", "max": "757", "mean": "455", "stdev": "124" }, { "name": "V777", "index": "10", "type": "numeric", "distinct": "479", "missing": "0", "min": "123", "max": "900", "mean": "328", "stdev": "185" }, { "name": "V1070", "index": "11", "type": "numeric", "distinct": "553", "missing": "0", "min": "0", "max": "898", "mean": "312", "stdev": "240" }, { "name": "V1337", "index": "12", "type": "numeric", "distinct": "563", "missing": "0", "min": "0", "max": "897", "mean": "289", "stdev": "240" }, { "name": "V1434", "index": "13", "type": "numeric", "distinct": "583", "missing": "0", "min": "52", "max": "838", "mean": "428", "stdev": "140" }, { "name": "V1447", "index": "14", "type": "numeric", "distinct": "546", "missing": "0", "min": "64", "max": "867", "mean": "490", "stdev": "131" }, { "name": "V1530", "index": "15", "type": "numeric", "distinct": "628", "missing": "0", "min": "45", "max": "876", "mean": "518", "stdev": "160" }, { "name": "V1556", "index": "16", "type": "numeric", "distinct": "561", "missing": "0", "min": "89", "max": "858", "mean": "462", "stdev": "137" }, { "name": "V1567", "index": "17", "type": "numeric", "distinct": "253", "missing": "0", "min": "4", "max": "900", "mean": "498", "stdev": "227" }, { "name": "V1601", "index": "18", "type": "numeric", "distinct": "623", "missing": "0", "min": "0", "max": "900", "mean": "253", "stdev": "194" }, { "name": "V1854", "index": "19", "type": "numeric", "distinct": "643", "missing": "0", "min": "53", "max": "882", "mean": "621", "stdev": "199" }, { "name": "V1858", "index": "20", "type": "numeric", "distinct": "510", "missing": "0", "min": "138", "max": "749", "mean": "468", "stdev": "125" }, { "name": "V1863", "index": "21", "type": "numeric", "distinct": "523", "missing": "0", "min": "0", "max": "898", "mean": "265", "stdev": "243" }, { "name": "V1958", "index": "22", "type": "numeric", "distinct": "743", "missing": "0", "min": "24", "max": "872", "mean": "503", "stdev": "210" }, { "name": "V2121", "index": "23", "type": "numeric", "distinct": "588", "missing": "0", "min": "148", "max": "900", "mean": "418", "stdev": "228" }, { "name": "V2177", "index": "24", "type": "numeric", "distinct": "578", "missing": "0", "min": "50", "max": "868", "mean": "631", "stdev": "166" }, { "name": "V2275", "index": "25", "type": "numeric", "distinct": "632", "missing": "0", "min": "0", "max": "900", "mean": "255", "stdev": "195" }, { "name": "V2378", "index": "26", "type": "numeric", "distinct": "611", "missing": "0", "min": "97", "max": "836", "mean": "541", "stdev": "160" }, { "name": "V2381", "index": "27", "type": "numeric", "distinct": "525", "missing": "0", "min": "0", "max": "896", "mean": "297", "stdev": "251" }, { "name": "V2439", "index": "28", "type": "numeric", "distinct": "615", "missing": "0", "min": "152", "max": "900", "mean": "427", "stdev": "230" }, { "name": "V2471", "index": "29", "type": "numeric", "distinct": "588", "missing": "0", "min": "141", "max": "900", "mean": "439", "stdev": "234" }, { "name": "V2714", "index": "30", "type": "numeric", "distinct": "571", "missing": "0", "min": "0", "max": "899", "mean": "302", "stdev": "245" }, { "name": "V2796", "index": "31", "type": "numeric", "distinct": "536", "missing": "0", "min": "0", "max": "897", "mean": "277", "stdev": "242" }, { "name": "V2916", "index": "32", "type": "numeric", "distinct": "634", "missing": "0", "min": "0", "max": "900", "mean": "249", "stdev": "193" }, { "name": "V2941", "index": "33", "type": "numeric", "distinct": "566", "missing": "0", "min": "102", "max": "861", "mean": "514", "stdev": "135" }, { "name": "V3015", "index": "34", "type": "numeric", "distinct": "661", "missing": "0", "min": "31", "max": "877", "mean": "546", "stdev": "175" }, { "name": "V3083", "index": "35", "type": "numeric", "distinct": "644", "missing": "0", "min": "0", "max": "900", "mean": "257", "stdev": "202" }, { "name": "V3147", "index": "36", "type": "numeric", "distinct": "617", "missing": "0", "min": "45", "max": "856", "mean": "361", "stdev": "162" }, { "name": "V3164", "index": "37", "type": "numeric", "distinct": "622", "missing": "0", "min": "0", "max": "900", "mean": "251", "stdev": "200" }, { "name": "V3194", "index": "38", "type": "numeric", "distinct": "549", "missing": "0", "min": "0", "max": "896", "mean": "292", "stdev": "257" }, { "name": "V3208", "index": "39", "type": "numeric", "distinct": "621", "missing": "0", "min": "0", "max": "900", "mean": "253", "stdev": "194" }, { "name": "V3217", "index": "40", "type": "numeric", "distinct": "607", "missing": "0", "min": "0", "max": "900", "mean": "243", "stdev": "189" }, { "name": "V3255", "index": "41", "type": "numeric", "distinct": "558", "missing": "0", "min": "105", "max": "822", "mean": "453", "stdev": "137" }, { "name": "V3369", "index": "42", "type": "numeric", "distinct": "551", "missing": "0", "min": "0", "max": "898", "mean": "299", "stdev": "257" }, { "name": "V3386", "index": "43", "type": "numeric", "distinct": "611", "missing": "0", "min": "54", "max": "848", "mean": "431", "stdev": "158" }, { "name": "V3415", "index": "44", "type": "numeric", "distinct": "543", "missing": "0", "min": "136", "max": "900", "mean": "373", "stdev": "212" }, { "name": "V3492", "index": "45", "type": "numeric", "distinct": "625", "missing": "0", "min": "66", "max": "833", "mean": "378", "stdev": "179" }, { "name": "V3579", "index": "46", "type": "numeric", "distinct": "482", "missing": "0", "min": "133", "max": "900", "mean": "316", "stdev": "174" }, { "name": "V3581", "index": "47", "type": "numeric", "distinct": "587", "missing": "0", "min": "130", "max": "900", "mean": "436", "stdev": "238" }, { "name": "V3608", "index": "48", "type": "numeric", "distinct": "504", "missing": "0", "min": "144", "max": "900", "mean": "352", "stdev": "199" }, { "name": "V3652", "index": "49", "type": "numeric", "distinct": "599", "missing": "0", "min": "55", "max": "879", "mean": "512", "stdev": "149" }, { "name": "V3706", "index": "50", "type": "numeric", "distinct": "710", "missing": "0", "min": "36", "max": "873", "mean": "455", "stdev": "196" }, { "name": "V3742", "index": "51", "type": "numeric", "distinct": "608", "missing": "0", "min": "0", "max": "900", "mean": "249", "stdev": "192" }, { "name": "V3762", "index": "52", "type": "numeric", "distinct": "543", "missing": "0", "min": "104", "max": "810", "mean": "454", "stdev": "131" }, { "name": "V3973", "index": "53", "type": "numeric", "distinct": "622", "missing": "0", "min": "0", "max": "900", "mean": "256", "stdev": "199" }, { "name": "V4005", "index": "54", "type": "numeric", "distinct": "613", "missing": "0", "min": "0", "max": "900", "mean": "247", "stdev": "198" }, { "name": "V4075", "index": "55", "type": "numeric", "distinct": "512", "missing": "0", "min": "32", "max": "847", "mean": "526", "stdev": "120" }, { "name": "V4142", "index": "56", "type": "numeric", "distinct": "553", "missing": "0", "min": "58", "max": "852", "mean": "362", "stdev": "147" }, { "name": "V4258", "index": "57", "type": "numeric", "distinct": "602", "missing": "0", "min": "0", "max": "900", "mean": "236", "stdev": "190" }, { "name": "V4259", "index": "58", "type": "numeric", "distinct": "537", "missing": "0", "min": "131", "max": "900", "mean": "377", "stdev": "216" }, { "name": "V4267", "index": "59", "type": "numeric", "distinct": "253", "missing": "0", "min": "4", "max": "900", "mean": "467", "stdev": "211" }, { "name": "V4409", "index": "60", "type": "numeric", "distinct": "580", "missing": "0", "min": "144", "max": "900", "mean": "412", "stdev": "227" }, { "name": "V4516", "index": "61", "type": "numeric", "distinct": "254", "missing": "0", "min": "0", "max": "900", "mean": "449", "stdev": "209" }, { "name": "V4552", "index": "62", "type": "numeric", "distinct": "548", "missing": "0", "min": "0", "max": "898", "mean": "297", "stdev": "246" }, { "name": "V4621", "index": "63", "type": "numeric", "distinct": "689", "missing": "0", "min": "48", "max": "876", "mean": "464", "stdev": "183" }, { "name": "V4681", "index": "64", "type": "numeric", "distinct": "533", "missing": "0", "min": "0", "max": "898", "mean": "267", "stdev": "241" }, { "name": "V4771", "index": "65", "type": "numeric", "distinct": "454", "missing": "0", "min": "146", "max": "801", "mean": "457", "stdev": "97" }, { "name": "V4838", "index": "66", "type": "numeric", "distinct": "553", "missing": "0", "min": "139", "max": "900", "mean": "373", "stdev": "206" }, { "name": "V4872", "index": "67", "type": "numeric", "distinct": "610", "missing": "0", "min": "63", "max": "856", "mean": "566", "stdev": "171" }, { "name": "V4875", "index": "68", "type": "numeric", "distinct": "491", "missing": "0", "min": "130", "max": "803", "mean": "356", "stdev": "128" }, { "name": "V4948", "index": "69", "type": "numeric", "distinct": "613", "missing": "0", "min": "0", "max": "900", "mean": "243", "stdev": "192" }, { "name": "V4965", "index": "70", "type": "numeric", "distinct": "619", "missing": "0", "min": "142", "max": "900", "mean": "421", "stdev": "231" }, { "name": "V4980", "index": "71", "type": "numeric", "distinct": "575", "missing": "0", "min": "88", "max": "853", "mean": "615", "stdev": "159" }, { "name": "V5013", "index": "72", "type": "numeric", "distinct": "650", "missing": "0", "min": "52", "max": "887", "mean": "598", "stdev": "190" }, { "name": "V5182", "index": "73", "type": "numeric", "distinct": "616", "missing": "0", "min": "0", "max": "900", "mean": "249", "stdev": "193" }, { "name": "V5338", "index": "74", "type": "numeric", "distinct": "548", "missing": "0", "min": "0", "max": "899", "mean": "279", "stdev": "242" }, { "name": "V5533", "index": "75", "type": "numeric", "distinct": "730", "missing": "0", "min": "33", "max": "887", "mean": "486", "stdev": "210" }, { "name": "V5544", "index": "76", "type": "numeric", "distinct": "254", "missing": "0", "min": "4", "max": "900", "mean": "451", "stdev": "212" }, { "name": "V5632", "index": "77", "type": "numeric", "distinct": "255", "missing": "0", "min": "0", "max": "900", "mean": "520", "stdev": "234" }, { "name": "V5783", "index": "78", "type": "numeric", "distinct": "678", "missing": "0", "min": "38", "max": "855", "mean": "425", "stdev": "177" }, { "name": "V5786", "index": "79", "type": "numeric", "distinct": "530", "missing": "0", "min": "122", "max": "847", "mean": "467", "stdev": "123" }, { "name": "V5948", "index": "80", "type": "numeric", "distinct": "251", "missing": "0", "min": "0", "max": "900", "mean": "478", "stdev": "210" }, { "name": "V5960", "index": "81", "type": "numeric", "distinct": "620", "missing": "0", "min": "49", "max": "800", "mean": "326", "stdev": "182" }, { "name": "V6088", "index": "82", "type": "numeric", "distinct": "510", "missing": "0", "min": "107", "max": "804", "mean": "456", "stdev": "118" }, { "name": "V6189", "index": "83", "type": "numeric", "distinct": "558", "missing": "0", "min": "131", "max": "900", "mean": "394", "stdev": "225" }, { "name": "V6193", "index": "84", "type": "numeric", "distinct": "599", "missing": "0", "min": "138", "max": "900", "mean": "429", "stdev": "238" }, { "name": "V6263", "index": "85", "type": "numeric", "distinct": "462", "missing": "0", "min": "164", "max": "737", "mean": "473", "stdev": "108" }, { "name": "V6269", "index": "86", "type": "numeric", "distinct": "631", "missing": "0", "min": "0", "max": "900", "mean": "255", "stdev": "200" }, { "name": "V6337", "index": "87", "type": "numeric", "distinct": "597", "missing": "0", "min": "0", "max": "900", "mean": "237", "stdev": "186" }, { "name": "V6369", "index": "88", "type": "numeric", "distinct": "494", "missing": "0", "min": "128", "max": "801", "mean": "458", "stdev": "112" }, { "name": "V6409", "index": "89", "type": "numeric", "distinct": "605", "missing": "0", "min": "74", "max": "861", "mean": "447", "stdev": "155" }, { "name": "V6490", "index": "90", "type": "numeric", "distinct": "545", "missing": "0", "min": "103", "max": "775", "mean": "474", "stdev": "133" }, { "name": "V6610", "index": "91", "type": "numeric", "distinct": "597", "missing": "0", "min": "63", "max": "853", "mean": "465", "stdev": "148" }, { "name": "V6670", "index": "92", "type": "numeric", "distinct": "602", "missing": "0", "min": "84", "max": "808", "mean": "393", "stdev": "161" }, { "name": "V6739", "index": "93", "type": "numeric", "distinct": "614", "missing": "0", "min": "0", "max": "900", "mean": "247", "stdev": "192" }, { "name": "V6859", "index": "94", "type": "numeric", "distinct": "614", "missing": "0", "min": "135", "max": "900", "mean": "443", "stdev": "237" }, { "name": "V6902", "index": "95", "type": "numeric", "distinct": "527", "missing": "0", "min": "0", "max": "899", "mean": "289", "stdev": "261" }, { "name": "V6982", "index": "96", "type": "numeric", "distinct": "555", "missing": "0", "min": "132", "max": "900", "mean": "372", "stdev": "213" }, { "name": "V7063", "index": "97", "type": "numeric", "distinct": "539", "missing": "0", "min": "0", "max": "899", "mean": "283", "stdev": "262" }, { "name": "V7140", "index": "98", "type": "numeric", "distinct": "580", "missing": "0", "min": "140", "max": "900", "mean": "407", "stdev": "226" }, { "name": "V7176", "index": "99", "type": "numeric", "distinct": "552", "missing": "0", "min": "0", "max": "897", "mean": "271", "stdev": "240" } ], "nr_of_issues": 0, "nr_of_downvotes": 0, "nr_of_likes": 0, "nr_of_downloads": 0, "total_downloads": 0, "reach": 0, "reuse": 0, "impact_of_reuse": 0, "reach_of_reuse": 0, "impact": 0 }