{ "data_id": "44742", "name": "robert_seed_4_nrows_2000_nclasses_10_ncols_100_stratify_True", "exact_name": "robert_seed_4_nrows_2000_nclasses_10_ncols_100_stratify_True", "version": 1, "version_label": "82ef559d-4b6a-40ac-a1a6-5c2810d52a7e", "description": "Subsampling of the dataset robert (41165) with\n\nseed=4\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:23", "update_comment": null, "last_update": "2022-11-17 18:47:23", "licence": "Public", "status": "active", "error_message": null, "url": "https:\/\/api.openml.org\/data\/download\/22111504\/dataset", "default_target_attribute": "class", "row_id_attribute": null, "ignore_attribute": null, "runs": 0, "suggest": { "input": [ "robert_seed_4_nrows_2000_nclasses_10_ncols_100_stratify_True", "Subsampling of the dataset robert (41165) with seed=4 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, "AutoCorrelation": 0.09404702351175588, "PercentageOfMissingValues": 0, "Dimensionality": 0.0505, "PercentageOfNumericFeatures": 99.00990099009901, "MajorityClassPercentage": 10.4, "PercentageOfSymbolicFeatures": 0.9900990099009901, "MajorityClassSize": 208, "MinorityClassPercentage": 9.6, "MinorityClassSize": 192, "NumberOfBinaryFeatures": 0 }, "tags": [ { "uploader": "38960", "tag": "Agriculture" }, { "uploader": "38960", "tag": "Earth Science" } ], "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", "208", "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", "201", "0", "0" ], [ "0", "0", "0", "0", "0", "0", "0", "0", "196", "0" ], [ "0", "0", "0", "0", "0", "0", "0", "0", "0", "207" ] ] ] }, { "name": "V193", "index": "0", "type": "numeric", "distinct": "253", "missing": "0", "min": "0", "max": "900", "mean": "497", "stdev": "233" }, { "name": "V250", "index": "1", "type": "numeric", "distinct": "540", "missing": "0", "min": "77", "max": "851", "mean": "401", "stdev": "140" }, { "name": "V432", "index": "2", "type": "numeric", "distinct": "621", "missing": "0", "min": "58", "max": "826", "mean": "519", "stdev": "169" }, { "name": "V568", "index": "3", "type": "numeric", "distinct": "545", "missing": "0", "min": "0", "max": "898", "mean": "297", "stdev": "244" }, { "name": "V575", "index": "4", "type": "numeric", "distinct": "619", "missing": "0", "min": "0", "max": "900", "mean": "240", "stdev": "192" }, { "name": "V645", "index": "5", "type": "numeric", "distinct": "254", "missing": "0", "min": "0", "max": "900", "mean": "468", "stdev": "209" }, { "name": "V828", "index": "6", "type": "numeric", "distinct": "557", "missing": "0", "min": "77", "max": "857", "mean": "485", "stdev": "134" }, { "name": "V920", "index": "7", "type": "numeric", "distinct": "250", "missing": "0", "min": "0", "max": "900", "mean": "460", "stdev": "213" }, { "name": "V954", "index": "8", "type": "numeric", "distinct": "618", "missing": "0", "min": "0", "max": "900", "mean": "244", "stdev": "189" }, { "name": "V994", "index": "9", "type": "numeric", "distinct": "553", "missing": "0", "min": "0", "max": "893", "mean": "307", "stdev": "243" }, { "name": "V1181", "index": "10", "type": "numeric", "distinct": "530", "missing": "0", "min": "85", "max": "864", "mean": "472", "stdev": "123" }, { "name": "V1228", "index": "11", "type": "numeric", "distinct": "669", "missing": "0", "min": "41", "max": "879", "mean": "440", "stdev": "171" }, { "name": "V1242", "index": "12", "type": "numeric", "distinct": "658", "missing": "0", "min": "39", "max": "842", "mean": "417", "stdev": "170" }, { "name": "V1269", "index": "13", "type": "numeric", "distinct": "533", "missing": "0", "min": "0", "max": "896", "mean": "279", "stdev": "250" }, { "name": "V1291", "index": "14", "type": "numeric", "distinct": "587", "missing": "0", "min": "58", "max": "871", "mean": "470", "stdev": "139" }, { "name": "V1372", "index": "15", "type": "numeric", "distinct": "540", "missing": "0", "min": "0", "max": "898", "mean": "284", "stdev": "267" }, { "name": "V1438", "index": "16", "type": "numeric", "distinct": "253", "missing": "0", "min": "0", "max": "900", "mean": "481", "stdev": "217" }, { "name": "V1485", "index": "17", "type": "numeric", "distinct": "684", "missing": "0", "min": "38", "max": "865", "mean": "407", "stdev": "191" }, { "name": "V1558", "index": "18", "type": "numeric", "distinct": "636", "missing": "0", "min": "65", "max": "879", "mean": "475", "stdev": "157" }, { "name": "V1564", "index": "19", "type": "numeric", "distinct": "701", "missing": "0", "min": "24", "max": "894", "mean": "575", "stdev": "193" }, { "name": "V1593", "index": "20", "type": "numeric", "distinct": "654", "missing": "0", "min": "34", "max": "886", "mean": "633", "stdev": "201" }, { "name": "V1603", "index": "21", "type": "numeric", "distinct": "249", "missing": "0", "min": "0", "max": "900", "mean": "493", "stdev": "208" }, { "name": "V1921", "index": "22", "type": "numeric", "distinct": "703", "missing": "0", "min": "31", "max": "882", "mean": "578", "stdev": "215" }, { "name": "V2014", "index": "23", "type": "numeric", "distinct": "667", "missing": "0", "min": "39", "max": "867", "mean": "457", "stdev": "174" }, { "name": "V2171", "index": "24", "type": "numeric", "distinct": "621", "missing": "0", "min": "0", "max": "900", "mean": "245", "stdev": "196" }, { "name": "V2409", "index": "25", "type": "numeric", "distinct": "530", "missing": "0", "min": "114", "max": "844", "mean": "475", "stdev": "118" }, { "name": "V2505", "index": "26", "type": "numeric", "distinct": "539", "missing": "0", "min": "0", "max": "899", "mean": "275", "stdev": "248" }, { "name": "V2602", "index": "27", "type": "numeric", "distinct": "654", "missing": "0", "min": "30", "max": "866", "mean": "337", "stdev": "182" }, { "name": "V2606", "index": "28", "type": "numeric", "distinct": "558", "missing": "0", "min": "0", "max": "899", "mean": "286", "stdev": "263" }, { "name": "V2637", "index": "29", "type": "numeric", "distinct": "581", "missing": "0", "min": "69", "max": "862", "mean": "437", "stdev": "138" }, { "name": "V2640", "index": "30", "type": "numeric", "distinct": "468", "missing": "0", "min": "80", "max": "811", "mean": "483", "stdev": "103" }, { "name": "V2678", "index": "31", "type": "numeric", "distinct": "254", "missing": "0", "min": "0", "max": "900", "mean": "470", "stdev": "211" }, { "name": "V2753", "index": "32", "type": "numeric", "distinct": "677", "missing": "0", "min": "58", "max": "858", "mean": "452", "stdev": "191" }, { "name": "V2917", "index": "33", "type": "numeric", "distinct": "623", "missing": "0", "min": "0", "max": "900", "mean": "249", "stdev": "201" }, { "name": "V3068", "index": "34", "type": "numeric", "distinct": "633", "missing": "0", "min": "0", "max": "900", "mean": "250", "stdev": "197" }, { "name": "V3225", "index": "35", "type": "numeric", "distinct": "705", "missing": "0", "min": "51", "max": "858", "mean": "417", "stdev": "198" }, { "name": "V3306", "index": "36", "type": "numeric", "distinct": "742", "missing": "0", "min": "27", "max": "874", "mean": "450", "stdev": "219" }, { "name": "V3313", "index": "37", "type": "numeric", "distinct": "514", "missing": "0", "min": "146", "max": "850", "mean": "400", "stdev": "129" }, { "name": "V3400", "index": "38", "type": "numeric", "distinct": "251", "missing": "0", "min": "0", "max": "900", "mean": "475", "stdev": "214" }, { "name": "V3418", "index": "39", "type": "numeric", "distinct": "536", "missing": "0", "min": "0", "max": "899", "mean": "288", "stdev": "262" }, { "name": "V3444", "index": "40", "type": "numeric", "distinct": "553", "missing": "0", "min": "0", "max": "898", "mean": "294", "stdev": "246" }, { "name": "V3528", "index": "41", "type": "numeric", "distinct": "544", "missing": "0", "min": "134", "max": "900", "mean": "358", "stdev": "202" }, { "name": "V3531", "index": "42", "type": "numeric", "distinct": "712", "missing": "0", "min": "35", "max": "888", "mean": "450", "stdev": "193" }, { "name": "V3560", "index": "43", "type": "numeric", "distinct": "598", "missing": "0", "min": "0", "max": "900", "mean": "232", "stdev": "194" }, { "name": "V3565", "index": "44", "type": "numeric", "distinct": "256", "missing": "0", "min": "0", "max": "900", "mean": "524", "stdev": "240" }, { "name": "V3574", "index": "45", "type": "numeric", "distinct": "677", "missing": "0", "min": "51", "max": "876", "mean": "554", "stdev": "193" }, { "name": "V3579", "index": "46", "type": "numeric", "distinct": "465", "missing": "0", "min": "109", "max": "900", "mean": "317", "stdev": "177" }, { "name": "V3633", "index": "47", "type": "numeric", "distinct": "576", "missing": "0", "min": "67", "max": "849", "mean": "599", "stdev": "159" }, { "name": "V3727", "index": "48", "type": "numeric", "distinct": "555", "missing": "0", "min": "0", "max": "898", "mean": "307", "stdev": "244" }, { "name": "V3740", "index": "49", "type": "numeric", "distinct": "253", "missing": "0", "min": "0", "max": "900", "mean": "472", "stdev": "215" }, { "name": "V3830", "index": "50", "type": "numeric", "distinct": "528", "missing": "0", "min": "0", "max": "898", "mean": "271", "stdev": "248" }, { "name": "V3867", "index": "51", "type": "numeric", "distinct": "665", "missing": "0", "min": "28", "max": "865", "mean": "415", "stdev": "175" }, { "name": "V3873", "index": "52", "type": "numeric", "distinct": "470", "missing": "0", "min": "150", "max": "831", "mean": "481", "stdev": "105" }, { "name": "V4092", "index": "53", "type": "numeric", "distinct": "652", "missing": "0", "min": "61", "max": "890", "mean": "465", "stdev": "164" }, { "name": "V4126", "index": "54", "type": "numeric", "distinct": "528", "missing": "0", "min": "0", "max": "898", "mean": "279", "stdev": "252" }, { "name": "V4134", "index": "55", "type": "numeric", "distinct": "651", "missing": "0", "min": "72", "max": "870", "mean": "517", "stdev": "168" }, { "name": "V4172", "index": "56", "type": "numeric", "distinct": "565", "missing": "0", "min": "0", "max": "899", "mean": "314", "stdev": "238" }, { "name": "V4207", "index": "57", "type": "numeric", "distinct": "552", "missing": "0", "min": "0", "max": "898", "mean": "285", "stdev": "246" }, { "name": "V4319", "index": "58", "type": "numeric", "distinct": "651", "missing": "0", "min": "35", "max": "883", "mean": "489", "stdev": "164" }, { "name": "V4348", "index": "59", "type": "numeric", "distinct": "545", "missing": "0", "min": "0", "max": "896", "mean": "319", "stdev": "239" }, { "name": "V4460", "index": "60", "type": "numeric", "distinct": "451", "missing": "0", "min": "146", "max": "776", "mean": "401", "stdev": "106" }, { "name": "V4594", "index": "61", "type": "numeric", "distinct": "590", "missing": "0", "min": "79", "max": "859", "mean": "526", "stdev": "154" }, { "name": "V4754", "index": "62", "type": "numeric", "distinct": "671", "missing": "0", "min": "43", "max": "885", "mean": "617", "stdev": "211" }, { "name": "V4757", "index": "63", "type": "numeric", "distinct": "615", "missing": "0", "min": "0", "max": "900", "mean": "245", "stdev": "190" }, { "name": "V4811", "index": "64", "type": "numeric", "distinct": "558", "missing": "0", "min": "85", "max": "843", "mean": "378", "stdev": "141" }, { "name": "V4850", "index": "65", "type": "numeric", "distinct": "575", "missing": "0", "min": "65", "max": "858", "mean": "471", "stdev": "136" }, { "name": "V4974", "index": "66", "type": "numeric", "distinct": "634", "missing": "0", "min": "72", "max": "844", "mean": "542", "stdev": "175" }, { "name": "V5035", "index": "67", "type": "numeric", "distinct": "253", "missing": "0", "min": "0", "max": "900", "mean": "481", "stdev": "221" }, { "name": "V5159", "index": "68", "type": "numeric", "distinct": "730", "missing": "0", "min": "27", "max": "865", "mean": "450", "stdev": "200" }, { "name": "V5227", "index": "69", "type": "numeric", "distinct": "673", "missing": "0", "min": "43", "max": "867", "mean": "477", "stdev": "178" }, { "name": "V5537", "index": "70", "type": "numeric", "distinct": "663", "missing": "0", "min": "49", "max": "877", "mean": "587", "stdev": "200" }, { "name": "V5624", "index": "71", "type": "numeric", "distinct": "639", "missing": "0", "min": "76", "max": "834", "mean": "478", "stdev": "169" }, { "name": "V5705", "index": "72", "type": "numeric", "distinct": "565", "missing": "0", "min": "115", "max": "840", "mean": "472", "stdev": "129" }, { "name": "V5788", "index": "73", "type": "numeric", "distinct": "663", "missing": "0", "min": "53", "max": "865", "mean": "442", "stdev": "175" }, { "name": "V5816", "index": "74", "type": "numeric", "distinct": "612", "missing": "0", "min": "40", "max": "819", "mean": "501", "stdev": "161" }, { "name": "V6120", "index": "75", "type": "numeric", "distinct": "664", "missing": "0", "min": "46", "max": "853", "mean": "342", "stdev": "195" }, { "name": "V6205", "index": "76", "type": "numeric", "distinct": "683", "missing": "0", "min": "33", "max": "852", "mean": "468", "stdev": "188" }, { "name": "V6261", "index": "77", "type": "numeric", "distinct": "542", "missing": "0", "min": "93", "max": "828", "mean": "414", "stdev": "134" }, { "name": "V6326", "index": "78", "type": "numeric", "distinct": "519", "missing": "0", "min": "127", "max": "866", "mean": "471", "stdev": "120" }, { "name": "V6365", "index": "79", "type": "numeric", "distinct": "606", "missing": "0", "min": "124", "max": "900", "mean": "436", "stdev": "236" }, { "name": "V6396", "index": "80", "type": "numeric", "distinct": "532", "missing": "0", "min": "142", "max": "900", "mean": "356", "stdev": "207" }, { "name": "V6426", "index": "81", "type": "numeric", "distinct": "607", "missing": "0", "min": "0", "max": "900", "mean": "236", "stdev": "190" }, { "name": "V6442", "index": "82", "type": "numeric", "distinct": "596", "missing": "0", "min": "66", "max": "870", "mean": "511", "stdev": "143" }, { "name": "V6630", "index": "83", "type": "numeric", "distinct": "689", "missing": "0", "min": "35", "max": "861", "mean": "424", "stdev": "186" }, { "name": "V6631", "index": "84", "type": "numeric", "distinct": "648", "missing": "0", "min": "68", "max": "846", "mean": "526", "stdev": "177" }, { "name": "V6669", "index": "85", "type": "numeric", "distinct": "629", "missing": "0", "min": "11", "max": "860", "mean": "243", "stdev": "208" }, { "name": "V6682", "index": "86", "type": "numeric", "distinct": "660", "missing": "0", "min": "64", "max": "867", "mean": "507", "stdev": "184" }, { "name": "V6698", "index": "87", "type": "numeric", "distinct": "563", "missing": "0", "min": "0", "max": "898", "mean": "303", "stdev": "252" }, { "name": "V6730", "index": "88", "type": "numeric", "distinct": "595", "missing": "0", "min": "0", "max": "895", "mean": "230", "stdev": "185" }, { "name": "V6736", "index": "89", "type": "numeric", "distinct": "574", "missing": "0", "min": "0", "max": "897", "mean": "318", "stdev": "243" }, { "name": "V6860", "index": "90", "type": "numeric", "distinct": "582", "missing": "0", "min": "66", "max": "828", "mean": "403", "stdev": "141" }, { "name": "V6876", "index": "91", "type": "numeric", "distinct": "653", "missing": "0", "min": "50", "max": "833", "mean": "473", "stdev": "177" }, { "name": "V6896", "index": "92", "type": "numeric", "distinct": "523", "missing": "0", "min": "105", "max": "781", "mean": "557", "stdev": "131" }, { "name": "V6913", "index": "93", "type": "numeric", "distinct": "608", "missing": "0", "min": "0", "max": "900", "mean": "246", "stdev": "191" }, { "name": "V6927", "index": "94", "type": "numeric", "distinct": "552", "missing": "0", "min": "130", "max": "900", "mean": "381", "stdev": "218" }, { "name": "V6938", "index": "95", "type": "numeric", "distinct": "523", "missing": "0", "min": "128", "max": "865", "mean": "469", "stdev": "123" }, { "name": "V7003", "index": "96", "type": "numeric", "distinct": "630", "missing": "0", "min": "40", "max": "852", "mean": "473", "stdev": "163" }, { "name": "V7018", "index": "97", "type": "numeric", "distinct": "694", "missing": "0", "min": "32", "max": "882", "mean": "558", "stdev": "190" }, { "name": "V7146", "index": "98", "type": "numeric", "distinct": "254", "missing": "0", "min": "0", "max": "900", "mean": "474", "stdev": "215" }, { "name": "V7164", "index": "99", "type": "numeric", "distinct": "627", "missing": "0", "min": "97", "max": "849", "mean": "438", "stdev": "166" } ], "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 }