{ "data_id": "44739", "name": "robert_seed_1_nrows_2000_nclasses_10_ncols_100_stratify_True", "exact_name": "robert_seed_1_nrows_2000_nclasses_10_ncols_100_stratify_True", "version": 1, "version_label": "303dadb0-d328-4430-8c24-c21e0c595d49", "description": "Subsampling of the dataset robert (41165) with\n\nseed=1\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:08", "update_comment": null, "last_update": "2022-11-17 18:47:08", "licence": "Public", "status": "active", "error_message": null, "url": "https:\/\/api.openml.org\/data\/download\/22111501\/dataset", "default_target_attribute": "class", "row_id_attribute": null, "ignore_attribute": null, "runs": 0, "suggest": { "input": [ "robert_seed_1_nrows_2000_nclasses_10_ncols_100_stratify_True", "Subsampling of the dataset robert (41165) with seed=1 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.10455227613806903, "PercentageOfMissingValues": 0, "Dimensionality": 0.0505, "PercentageOfNumericFeatures": 99.00990099009901, "MajorityClassPercentage": 10.45, "PercentageOfSymbolicFeatures": 0.9900990099009901, "MajorityClassSize": 209, "MinorityClassPercentage": 9.55, "MinorityClassSize": 191, "NumberOfBinaryFeatures": 0 }, "tags": [ { "uploader": "38960", "tag": "Machine Learning" }, { "uploader": "38960", "tag": "Mathematics" } ], "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", "191", "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", "201", "0", "0" ], [ "0", "0", "0", "0", "0", "0", "0", "0", "196", "0" ], [ "0", "0", "0", "0", "0", "0", "0", "0", "0", "207" ] ] ] }, { "name": "V142", "index": "0", "type": "numeric", "distinct": "621", "missing": "0", "min": "0", "max": "900", "mean": "253", "stdev": "194" }, { "name": "V197", "index": "1", "type": "numeric", "distinct": "254", "missing": "0", "min": "0", "max": "900", "mean": "487", "stdev": "214" }, { "name": "V248", "index": "2", "type": "numeric", "distinct": "255", "missing": "0", "min": "0", "max": "900", "mean": "499", "stdev": "229" }, { "name": "V285", "index": "3", "type": "numeric", "distinct": "543", "missing": "0", "min": "0", "max": "899", "mean": "280", "stdev": "256" }, { "name": "V390", "index": "4", "type": "numeric", "distinct": "615", "missing": "0", "min": "0", "max": "900", "mean": "246", "stdev": "188" }, { "name": "V444", "index": "5", "type": "numeric", "distinct": "579", "missing": "0", "min": "92", "max": "859", "mean": "461", "stdev": "143" }, { "name": "V448", "index": "6", "type": "numeric", "distinct": "652", "missing": "0", "min": "57", "max": "851", "mean": "497", "stdev": "171" }, { "name": "V611", "index": "7", "type": "numeric", "distinct": "568", "missing": "0", "min": "0", "max": "898", "mean": "301", "stdev": "245" }, { "name": "V659", "index": "8", "type": "numeric", "distinct": "683", "missing": "0", "min": "36", "max": "875", "mean": "518", "stdev": "193" }, { "name": "V831", "index": "9", "type": "numeric", "distinct": "579", "missing": "0", "min": "144", "max": "900", "mean": "391", "stdev": "223" }, { "name": "V836", "index": "10", "type": "numeric", "distinct": "254", "missing": "0", "min": "0", "max": "900", "mean": "456", "stdev": "214" }, { "name": "V884", "index": "11", "type": "numeric", "distinct": "254", "missing": "0", "min": "0", "max": "900", "mean": "473", "stdev": "220" }, { "name": "V888", "index": "12", "type": "numeric", "distinct": "617", "missing": "0", "min": "0", "max": "900", "mean": "249", "stdev": "212" }, { "name": "V957", "index": "13", "type": "numeric", "distinct": "641", "missing": "0", "min": "77", "max": "873", "mean": "398", "stdev": "173" }, { "name": "V1025", "index": "14", "type": "numeric", "distinct": "515", "missing": "0", "min": "144", "max": "900", "mean": "356", "stdev": "207" }, { "name": "V1065", "index": "15", "type": "numeric", "distinct": "649", "missing": "0", "min": "50", "max": "870", "mean": "476", "stdev": "164" }, { "name": "V1150", "index": "16", "type": "numeric", "distinct": "550", "missing": "0", "min": "0", "max": "899", "mean": "302", "stdev": "255" }, { "name": "V1453", "index": "17", "type": "numeric", "distinct": "634", "missing": "0", "min": "47", "max": "883", "mean": "643", "stdev": "208" }, { "name": "V1544", "index": "18", "type": "numeric", "distinct": "566", "missing": "0", "min": "0", "max": "895", "mean": "304", "stdev": "245" }, { "name": "V1772", "index": "19", "type": "numeric", "distinct": "552", "missing": "0", "min": "62", "max": "846", "mean": "393", "stdev": "141" }, { "name": "V1829", "index": "20", "type": "numeric", "distinct": "627", "missing": "0", "min": "0", "max": "900", "mean": "250", "stdev": "208" }, { "name": "V1870", "index": "21", "type": "numeric", "distinct": "554", "missing": "0", "min": "0", "max": "896", "mean": "308", "stdev": "238" }, { "name": "V1873", "index": "22", "type": "numeric", "distinct": "255", "missing": "0", "min": "0", "max": "900", "mean": "509", "stdev": "234" }, { "name": "V1944", "index": "23", "type": "numeric", "distinct": "693", "missing": "0", "min": "51", "max": "875", "mean": "514", "stdev": "197" }, { "name": "V1982", "index": "24", "type": "numeric", "distinct": "627", "missing": "0", "min": "78", "max": "847", "mean": "465", "stdev": "160" }, { "name": "V2004", "index": "25", "type": "numeric", "distinct": "521", "missing": "0", "min": "74", "max": "844", "mean": "466", "stdev": "119" }, { "name": "V2097", "index": "26", "type": "numeric", "distinct": "252", "missing": "0", "min": "0", "max": "900", "mean": "443", "stdev": "208" }, { "name": "V2099", "index": "27", "type": "numeric", "distinct": "700", "missing": "0", "min": "50", "max": "876", "mean": "475", "stdev": "187" }, { "name": "V2162", "index": "28", "type": "numeric", "distinct": "649", "missing": "0", "min": "31", "max": "869", "mean": "587", "stdev": "195" }, { "name": "V2218", "index": "29", "type": "numeric", "distinct": "560", "missing": "0", "min": "129", "max": "874", "mean": "462", "stdev": "133" }, { "name": "V2310", "index": "30", "type": "numeric", "distinct": "736", "missing": "0", "min": "17", "max": "882", "mean": "477", "stdev": "205" }, { "name": "V2350", "index": "31", "type": "numeric", "distinct": "549", "missing": "0", "min": "0", "max": "899", "mean": "287", "stdev": "256" }, { "name": "V2478", "index": "32", "type": "numeric", "distinct": "626", "missing": "0", "min": "0", "max": "900", "mean": "247", "stdev": "193" }, { "name": "V2602", "index": "33", "type": "numeric", "distinct": "649", "missing": "0", "min": "30", "max": "876", "mean": "339", "stdev": "186" }, { "name": "V2643", "index": "34", "type": "numeric", "distinct": "253", "missing": "0", "min": "0", "max": "900", "mean": "507", "stdev": "235" }, { "name": "V2735", "index": "35", "type": "numeric", "distinct": "534", "missing": "0", "min": "80", "max": "874", "mean": "466", "stdev": "126" }, { "name": "V2877", "index": "36", "type": "numeric", "distinct": "255", "missing": "0", "min": "0", "max": "900", "mean": "461", "stdev": "217" }, { "name": "V2912", "index": "37", "type": "numeric", "distinct": "252", "missing": "0", "min": "0", "max": "900", "mean": "473", "stdev": "214" }, { "name": "V3011", "index": "38", "type": "numeric", "distinct": "661", "missing": "0", "min": "13", "max": "882", "mean": "468", "stdev": "171" }, { "name": "V3016", "index": "39", "type": "numeric", "distinct": "513", "missing": "0", "min": "92", "max": "798", "mean": "447", "stdev": "122" }, { "name": "V3043", "index": "40", "type": "numeric", "distinct": "711", "missing": "0", "min": "32", "max": "886", "mean": "462", "stdev": "194" }, { "name": "V3066", "index": "41", "type": "numeric", "distinct": "256", "missing": "0", "min": "0", "max": "900", "mean": "461", "stdev": "210" }, { "name": "V3227", "index": "42", "type": "numeric", "distinct": "566", "missing": "0", "min": "67", "max": "854", "mean": "468", "stdev": "129" }, { "name": "V3235", "index": "43", "type": "numeric", "distinct": "586", "missing": "0", "min": "55", "max": "853", "mean": "343", "stdev": "148" }, { "name": "V3266", "index": "44", "type": "numeric", "distinct": "625", "missing": "0", "min": "0", "max": "900", "mean": "252", "stdev": "192" }, { "name": "V3283", "index": "45", "type": "numeric", "distinct": "692", "missing": "0", "min": "45", "max": "868", "mean": "481", "stdev": "194" }, { "name": "V3298", "index": "46", "type": "numeric", "distinct": "578", "missing": "0", "min": "144", "max": "900", "mean": "397", "stdev": "220" }, { "name": "V3361", "index": "47", "type": "numeric", "distinct": "724", "missing": "0", "min": "35", "max": "881", "mean": "505", "stdev": "210" }, { "name": "V3468", "index": "48", "type": "numeric", "distinct": "534", "missing": "0", "min": "0", "max": "898", "mean": "289", "stdev": "262" }, { "name": "V3560", "index": "49", "type": "numeric", "distinct": "604", "missing": "0", "min": "0", "max": "900", "mean": "238", "stdev": "201" }, { "name": "V3586", "index": "50", "type": "numeric", "distinct": "622", "missing": "0", "min": "0", "max": "900", "mean": "254", "stdev": "197" }, { "name": "V3635", "index": "51", "type": "numeric", "distinct": "550", "missing": "0", "min": "0", "max": "899", "mean": "279", "stdev": "256" }, { "name": "V3665", "index": "52", "type": "numeric", "distinct": "538", "missing": "0", "min": "0", "max": "898", "mean": "297", "stdev": "256" }, { "name": "V3676", "index": "53", "type": "numeric", "distinct": "504", "missing": "0", "min": "139", "max": "900", "mean": "353", "stdev": "208" }, { "name": "V3697", "index": "54", "type": "numeric", "distinct": "254", "missing": "0", "min": "0", "max": "900", "mean": "459", "stdev": "217" }, { "name": "V3794", "index": "55", "type": "numeric", "distinct": "614", "missing": "0", "min": "132", "max": "900", "mean": "448", "stdev": "240" }, { "name": "V3834", "index": "56", "type": "numeric", "distinct": "557", "missing": "0", "min": "61", "max": "827", "mean": "402", "stdev": "136" }, { "name": "V3872", "index": "57", "type": "numeric", "distinct": "489", "missing": "0", "min": "87", "max": "752", "mean": "473", "stdev": "115" }, { "name": "V3913", "index": "58", "type": "numeric", "distinct": "631", "missing": "0", "min": "34", "max": "875", "mean": "633", "stdev": "191" }, { "name": "V3924", "index": "59", "type": "numeric", "distinct": "497", "missing": "0", "min": "136", "max": "780", "mean": "494", "stdev": "117" }, { "name": "V4183", "index": "60", "type": "numeric", "distinct": "254", "missing": "0", "min": "0", "max": "900", "mean": "521", "stdev": "245" }, { "name": "V4261", "index": "61", "type": "numeric", "distinct": "519", "missing": "0", "min": "130", "max": "847", "mean": "400", "stdev": "123" }, { "name": "V4396", "index": "62", "type": "numeric", "distinct": "513", "missing": "0", "min": "106", "max": "830", "mean": "511", "stdev": "121" }, { "name": "V4468", "index": "63", "type": "numeric", "distinct": "650", "missing": "0", "min": "49", "max": "855", "mean": "457", "stdev": "159" }, { "name": "V4583", "index": "64", "type": "numeric", "distinct": "736", "missing": "0", "min": "24", "max": "871", "mean": "493", "stdev": "208" }, { "name": "V4607", "index": "65", "type": "numeric", "distinct": "523", "missing": "0", "min": "90", "max": "876", "mean": "509", "stdev": "127" }, { "name": "V4846", "index": "66", "type": "numeric", "distinct": "674", "missing": "0", "min": "55", "max": "878", "mean": "518", "stdev": "175" }, { "name": "V5156", "index": "67", "type": "numeric", "distinct": "632", "missing": "0", "min": "0", "max": "900", "mean": "256", "stdev": "196" }, { "name": "V5184", "index": "68", "type": "numeric", "distinct": "644", "missing": "0", "min": "38", "max": "853", "mean": "500", "stdev": "167" }, { "name": "V5196", "index": "69", "type": "numeric", "distinct": "554", "missing": "0", "min": "133", "max": "900", "mean": "380", "stdev": "219" }, { "name": "V5356", "index": "70", "type": "numeric", "distinct": "556", "missing": "0", "min": "0", "max": "899", "mean": "296", "stdev": "248" }, { "name": "V5360", "index": "71", "type": "numeric", "distinct": "600", "missing": "0", "min": "84", "max": "845", "mean": "423", "stdev": "152" }, { "name": "V5364", "index": "72", "type": "numeric", "distinct": "252", "missing": "0", "min": "0", "max": "900", "mean": "495", "stdev": "224" }, { "name": "V5367", "index": "73", "type": "numeric", "distinct": "553", "missing": "0", "min": "0", "max": "898", "mean": "287", "stdev": "254" }, { "name": "V5419", "index": "74", "type": "numeric", "distinct": "657", "missing": "0", "min": "19", "max": "884", "mean": "625", "stdev": "209" }, { "name": "V5532", "index": "75", "type": "numeric", "distinct": "585", "missing": "0", "min": "90", "max": "815", "mean": "559", "stdev": "159" }, { "name": "V5542", "index": "76", "type": "numeric", "distinct": "615", "missing": "0", "min": "38", "max": "864", "mean": "457", "stdev": "153" }, { "name": "V5568", "index": "77", "type": "numeric", "distinct": "625", "missing": "0", "min": "49", "max": "828", "mean": "477", "stdev": "169" }, { "name": "V5620", "index": "78", "type": "numeric", "distinct": "251", "missing": "0", "min": "0", "max": "900", "mean": "457", "stdev": "213" }, { "name": "V5782", "index": "79", "type": "numeric", "distinct": "675", "missing": "0", "min": "32", "max": "884", "mean": "599", "stdev": "204" }, { "name": "V5826", "index": "80", "type": "numeric", "distinct": "462", "missing": "0", "min": "133", "max": "900", "mean": "315", "stdev": "179" }, { "name": "V5849", "index": "81", "type": "numeric", "distinct": "642", "missing": "0", "min": "45", "max": "853", "mean": "436", "stdev": "168" }, { "name": "V5889", "index": "82", "type": "numeric", "distinct": "553", "missing": "0", "min": "0", "max": "894", "mean": "310", "stdev": "241" }, { "name": "V5902", "index": "83", "type": "numeric", "distinct": "568", "missing": "0", "min": "148", "max": "900", "mean": "406", "stdev": "232" }, { "name": "V5969", "index": "84", "type": "numeric", "distinct": "750", "missing": "0", "min": "27", "max": "895", "mean": "429", "stdev": "215" }, { "name": "V6039", "index": "85", "type": "numeric", "distinct": "613", "missing": "0", "min": "0", "max": "900", "mean": "256", "stdev": "194" }, { "name": "V6126", "index": "86", "type": "numeric", "distinct": "559", "missing": "0", "min": "135", "max": "900", "mean": "377", "stdev": "215" }, { "name": "V6164", "index": "87", "type": "numeric", "distinct": "640", "missing": "0", "min": "0", "max": "900", "mean": "257", "stdev": "202" }, { "name": "V6180", "index": "88", "type": "numeric", "distinct": "249", "missing": "0", "min": "4", "max": "900", "mean": "449", "stdev": "212" }, { "name": "V6260", "index": "89", "type": "numeric", "distinct": "548", "missing": "0", "min": "0", "max": "898", "mean": "288", "stdev": "255" }, { "name": "V6451", "index": "90", "type": "numeric", "distinct": "618", "missing": "0", "min": "50", "max": "826", "mean": "325", "stdev": "175" }, { "name": "V6579", "index": "91", "type": "numeric", "distinct": "256", "missing": "0", "min": "0", "max": "900", "mean": "475", "stdev": "214" }, { "name": "V6618", "index": "92", "type": "numeric", "distinct": "662", "missing": "0", "min": "46", "max": "859", "mean": "492", "stdev": "176" }, { "name": "V6744", "index": "93", "type": "numeric", "distinct": "501", "missing": "0", "min": "130", "max": "900", "mean": "340", "stdev": "195" }, { "name": "V6753", "index": "94", "type": "numeric", "distinct": "251", "missing": "0", "min": "0", "max": "900", "mean": "489", "stdev": "211" }, { "name": "V6876", "index": "95", "type": "numeric", "distinct": "662", "missing": "0", "min": "62", "max": "819", "mean": "480", "stdev": "181" }, { "name": "V6945", "index": "96", "type": "numeric", "distinct": "520", "missing": "0", "min": "134", "max": "900", "mean": "341", "stdev": "195" }, { "name": "V6969", "index": "97", "type": "numeric", "distinct": "724", "missing": "0", "min": "23", "max": "881", "mean": "452", "stdev": "203" }, { "name": "V7011", "index": "98", "type": "numeric", "distinct": "485", "missing": "0", "min": "130", "max": "779", "mean": "481", "stdev": "113" }, { "name": "V7058", "index": "99", "type": "numeric", "distinct": "687", "missing": "0", "min": "24", "max": "887", "mean": "350", "stdev": "203" } ], "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 }