{ "data_id": "44705", "name": "connect-4_seed_2_nrows_2000_nclasses_10_ncols_100_stratify_True", "exact_name": "connect-4_seed_2_nrows_2000_nclasses_10_ncols_100_stratify_True", "version": 1, "version_label": "6f3f2b7c-df79-4fd9-9121-5d21c4f357f2", "description": "Subsampling of the dataset connect-4 (40668) 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:44:26", "update_comment": null, "last_update": "2022-11-17 18:44:26", "licence": "public", "status": "active", "error_message": null, "url": "https:\/\/api.openml.org\/data\/download\/22111467\/dataset", "default_target_attribute": "class", "row_id_attribute": null, "ignore_attribute": null, "runs": 0, "suggest": { "input": [ "connect-4_seed_2_nrows_2000_nclasses_10_ncols_100_stratify_True", "Subsampling of the dataset connect-4 (40668) 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 " ], "weight": 5 }, "qualities": { "NumberOfInstances": 2000, "NumberOfFeatures": 43, "NumberOfClasses": 3, "NumberOfMissingValues": 0, "NumberOfInstancesWithMissingValues": 0, "NumberOfNumericFeatures": 0, "NumberOfSymbolicFeatures": 43, "PercentageOfInstancesWithMissingValues": 0, "AutoCorrelation": 0.5017508754377189, "PercentageOfMissingValues": 0, "Dimensionality": 0.0215, "PercentageOfNumericFeatures": 0, "MajorityClassPercentage": 65.85, "PercentageOfSymbolicFeatures": 100, "MajorityClassSize": 1317, "MinorityClassPercentage": 9.55, "MinorityClassSize": 191, "NumberOfBinaryFeatures": 0, "PercentageOfBinaryFeatures": 0 }, "tags": [ { "uploader": "38960", "tag": "Meteorology" }, { "uploader": "38960", "tag": "Transportation" } ], "features": [ { "name": "class", "index": "42", "type": "nominal", "distinct": "3", "missing": "0", "target": "1", "distr": [ [ "0", "1", "2" ], [ [ "191", "0", "0" ], [ "0", "492", "0" ], [ "0", "0", "1317" ] ] ] }, { "name": "a1", "index": "0", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "65", "197", "487" ], [ "59", "79", "497" ], [ "67", "216", "333" ] ] ] }, { "name": "a2", "index": "1", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "112", "345", "836" ], [ "31", "53", "270" ], [ "48", "94", "211" ] ] ] }, { "name": "a3", "index": "2", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "143", "421", "1064" ], [ "25", "32", "138" ], [ "23", "39", "115" ] ] ] }, { "name": "a4", "index": "3", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "163", "460", "1196" ], [ "18", "18", "53" ], [ "10", "14", "68" ] ] ] }, { "name": "a5", "index": "4", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "177", "482", "1267" ], [ "8", "2", "26" ], [ "6", "8", "24" ] ] ] }, { "name": "a6", "index": "5", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "190", "488", "1304" ], [ "0", "2", "11" ], [ "1", "2", "2" ] ] ] }, { "name": "b1", "index": "6", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "64", "144", "404" ], [ "43", "112", "423" ], [ "84", "236", "490" ] ] ] }, { "name": "b2", "index": "7", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "116", "305", "797" ], [ "55", "109", "230" ], [ "20", "78", "290" ] ] ] }, { "name": "b3", "index": "8", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "155", "387", "1068" ], [ "14", "67", "130" ], [ "22", "38", "119" ] ] ] }, { "name": "b4", "index": "9", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "176", "437", "1198" ], [ "11", "33", "59" ], [ "4", "22", "60" ] ] ] }, { "name": "b5", "index": "10", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "185", "471", "1269" ], [ "2", "6", "26" ], [ "4", "15", "22" ] ] ] }, { "name": "b6", "index": "11", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "188", "485", "1310" ], [ "2", "2", "7" ], [ "1", "5", "0" ] ] ] }, { "name": "c1", "index": "12", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "41", "102", "340" ], [ "58", "131", "353" ], [ "92", "259", "624" ] ] ] }, { "name": "c2", "index": "13", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "111", "247", "765" ], [ "38", "171", "241" ], [ "42", "74", "311" ] ] ] }, { "name": "c3", "index": "14", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "144", "372", "1054" ], [ "33", "95", "103" ], [ "14", "25", "160" ] ] ] }, { "name": "c4", "index": "15", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "169", "439", "1200" ], [ "7", "30", "61" ], [ "15", "23", "56" ] ] ] }, { "name": "c5", "index": "16", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "178", "475", "1272" ], [ "7", "5", "23" ], [ "6", "12", "22" ] ] ] }, { "name": "c6", "index": "17", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "189", "489", "1296" ], [ "0", "1", "18" ], [ "2", "2", "3" ] ] ] }, { "name": "d1", "index": "18", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "113", "198", "569" ], [ "43", "186", "327" ], [ "35", "108", "421" ] ] ] }, { "name": "d2", "index": "19", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "152", "311", "917" ], [ "12", "136", "157" ], [ "27", "45", "243" ] ] ] }, { "name": "d3", "index": "20", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "163", "404", "1148" ], [ "22", "60", "56" ], [ "6", "28", "113" ] ] ] }, { "name": "d4", "index": "21", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "182", "450", "1237" ], [ "1", "32", "29" ], [ "8", "10", "51" ] ] ] }, { "name": "d5", "index": "22", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "186", "471", "1292" ], [ "4", "8", "17" ], [ "1", "13", "8" ] ] ] }, { "name": "d6", "index": "23", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "189", "489", "1314" ], [ "0", "2", "2" ], [ "2", "1", "1" ] ] ] }, { "name": "e1", "index": "24", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "121", "306", "769" ], [ "52", "133", "407" ], [ "18", "53", "141" ] ] ] }, { "name": "e2", "index": "25", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "163", "407", "1081" ], [ "11", "58", "89" ], [ "17", "27", "147" ] ] ] }, { "name": "e3", "index": "26", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "176", "466", "1219" ], [ "10", "16", "42" ], [ "5", "10", "56" ] ] ] }, { "name": "e4", "index": "27", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "185", "481", "1278" ], [ "3", "7", "15" ], [ "3", "4", "24" ] ] ] }, { "name": "e5", "index": "28", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "189", "487", "1308" ], [ "0", "1", "7" ], [ "2", "4", "2" ] ] ] }, { "name": "e6", "index": "29", "type": "nominal", "distinct": "1", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "191", "492", "1317" ], [ "0", "0", "0" ], [ "0", "0", "0" ] ] ] }, { "name": "f1", "index": "30", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "109", "275", "633" ], [ "48", "109", "412" ], [ "34", "108", "272" ] ] ] }, { "name": "f2", "index": "31", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "150", "390", "984" ], [ "25", "62", "153" ], [ "16", "40", "180" ] ] ] }, { "name": "f3", "index": "32", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "175", "449", "1170" ], [ "8", "23", "69" ], [ "8", "20", "78" ] ] ] }, { "name": "f4", "index": "33", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "184", "481", "1260" ], [ "6", "7", "33" ], [ "1", "4", "24" ] ] ] }, { "name": "f5", "index": "34", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "188", "487", "1307" ], [ "0", "2", "5" ], [ "3", "3", "5" ] ] ] }, { "name": "f6", "index": "35", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "190", "492", "1314" ], [ "1", "0", "3" ], [ "0", "0", "0" ] ] ] }, { "name": "g1", "index": "36", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "78", "226", "565" ], [ "63", "87", "418" ], [ "50", "179", "334" ] ] ] }, { "name": "g2", "index": "37", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "129", "354", "937" ], [ "17", "49", "227" ], [ "45", "89", "153" ] ] ] }, { "name": "g3", "index": "38", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "159", "424", "1153" ], [ "16", "21", "86" ], [ "16", "47", "78" ] ] ] }, { "name": "g4", "index": "39", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "175", "465", "1263" ], [ "11", "18", "30" ], [ "5", "9", "24" ] ] ] }, { "name": "g5", "index": "40", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "190", "485", "1301" ], [ "0", "3", "13" ], [ "1", "4", "3" ] ] ] }, { "name": "g6", "index": "41", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "191", "492", "1315" ], [ "0", "0", "2" ], [ "0", "0", "0" ] ] ] } ], "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 }