{ "data_id": "44789", "name": "KDDCup09-Upselling_seed_1_nrows_2000_nclasses_10_ncols_100_stratify_True", "exact_name": "KDDCup09-Upselling_seed_1_nrows_2000_nclasses_10_ncols_100_stratify_True", "version": 1, "version_label": "08a31017-6dfa-4672-a059-c5cc58bb3c4a", "description": "Subsampling of the dataset KDDCup09-Upselling (43072) 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 19:05:44", "update_comment": null, "last_update": "2022-11-17 19:05:44", "licence": "Public", "status": "active", "error_message": null, "url": "https:\/\/api.openml.org\/data\/download\/22111551\/dataset", "default_target_attribute": "upselling", "row_id_attribute": null, "ignore_attribute": null, "runs": 0, "suggest": { "input": [ "KDDCup09-Upselling_seed_1_nrows_2000_nclasses_10_ncols_100_stratify_True", "Subsampling of the dataset KDDCup09-Upselling (43072) 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 = r " ], "weight": 5 }, "qualities": { "NumberOfInstances": 2000, "NumberOfFeatures": 101, "NumberOfClasses": 2, "NumberOfMissingValues": 7121, "NumberOfInstancesWithMissingValues": 2000, "NumberOfNumericFeatures": 99, "NumberOfSymbolicFeatures": 2, "PercentageOfInstancesWithMissingValues": 100, "PercentageOfMissingValues": 3.525247524752475, "AutoCorrelation": 0.8679339669834918, "PercentageOfNumericFeatures": 98.01980198019803, "Dimensionality": 0.0505, "PercentageOfSymbolicFeatures": 1.9801980198019802, "MajorityClassPercentage": 92.65, "MajorityClassSize": 1853, "MinorityClassPercentage": 7.35, "MinorityClassSize": 147, "NumberOfBinaryFeatures": 1, "PercentageOfBinaryFeatures": 0.9900990099009901 }, "tags": [ { "uploader": "38960", "tag": "Images" }, { "uploader": "38960", "tag": "Machine Learning" } ], "features": [ { "name": "upselling", "index": "100", "type": "nominal", "distinct": "2", "missing": "0", "target": "1", "distr": [ [ "-1", "1" ], [ [ "1853", "0" ], [ "0", "147" ] ] ] }, { "name": "Var298", "index": "0", "type": "numeric", "distinct": "4", "missing": "0", "min": "0", "max": "1629", "mean": "1", "stdev": "45" }, { "name": "Var412", "index": "1", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "5", "mean": "0", "stdev": "1" }, { "name": "Var519", "index": "2", "type": "numeric", "distinct": "9", "missing": "0", "min": "0", "max": "152", "mean": "0", "stdev": "6" }, { "name": "Var592", "index": "3", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "6", "mean": "0", "stdev": "2" }, { "name": "Var809", "index": "4", "type": "numeric", "distinct": "1", "missing": "1444", "min": "8", "max": "8", "mean": "8", "stdev": "0" }, { "name": "Var924", "index": "5", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var931", "index": "6", "type": "numeric", "distinct": "10", "missing": "0", "min": "0", "max": "110", "mean": "0", "stdev": "3" }, { "name": "Var1274", "index": "7", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var1373", "index": "8", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var1727", "index": "9", "type": "numeric", "distinct": "32", "missing": "0", "min": "0", "max": "856", "mean": "4", "stdev": "28" }, { "name": "Var1741", "index": "10", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var1842", "index": "11", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "2", "mean": "0", "stdev": "0" }, { "name": "Var1850", "index": "12", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "7", "mean": "0", "stdev": "0" }, { "name": "Var1993", "index": "13", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "9", "mean": "0", "stdev": "0" }, { "name": "Var2140", "index": "14", "type": "numeric", "distinct": "3", "missing": "0", "min": "0", "max": "18", "mean": "0", "stdev": "1" }, { "name": "Var2209", "index": "15", "type": "numeric", "distinct": "13", "missing": "0", "min": "0", "max": "36666", "mean": "31", "stdev": "857" }, { "name": "Var2392", "index": "16", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var3025", "index": "17", "type": "numeric", "distinct": "3", "missing": "0", "min": "0", "max": "27", "mean": "0", "stdev": "1" }, { "name": "Var3205", "index": "18", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "9", "mean": "0", "stdev": "0" }, { "name": "Var3698", "index": "19", "type": "numeric", "distinct": "11", "missing": "0", "min": "0", "max": "70", "mean": "3", "stdev": "7" }, { "name": "Var3815", "index": "20", "type": "numeric", "distinct": "5", "missing": "1958", "min": "0", "max": "196", "mean": "11", "stdev": "37" }, { "name": "Var3879", "index": "21", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var3900", "index": "22", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var4053", "index": "23", "type": "numeric", "distinct": "72", "missing": "0", "min": "0", "max": "5512", "mean": "71", "stdev": "198" }, { "name": "Var4121", "index": "24", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "5", "mean": "0", "stdev": "0" }, { "name": "Var4170", "index": "25", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "3", "mean": "0", "stdev": "0" }, { "name": "Var4363", "index": "26", "type": "numeric", "distinct": "19", "missing": "0", "min": "0", "max": "132", "mean": "1", "stdev": "9" }, { "name": "Var4505", "index": "27", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "3", "mean": "0", "stdev": "0" }, { "name": "Var4627", "index": "28", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "5", "mean": "0", "stdev": "0" }, { "name": "Var4803", "index": "29", "type": "numeric", "distinct": "1431", "missing": "0", "min": "0", "max": "25715520", "mean": "2181932", "stdev": "2502032" }, { "name": "Var4898", "index": "30", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "6", "mean": "0", "stdev": "1" }, { "name": "Var5142", "index": "31", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var5406", "index": "32", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "36", "mean": "0", "stdev": "1" }, { "name": "Var5488", "index": "33", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "2", "mean": "0", "stdev": "0" }, { "name": "Var5697", "index": "34", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var5991", "index": "35", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var6074", "index": "36", "type": "numeric", "distinct": "3", "missing": "0", "min": "0", "max": "36", "mean": "0", "stdev": "1" }, { "name": "Var6270", "index": "37", "type": "numeric", "distinct": "31", "missing": "0", "min": "0", "max": "12848", "mean": "36", "stdev": "452" }, { "name": "Var6282", "index": "38", "type": "numeric", "distinct": "182", "missing": "0", "min": "0", "max": "141360", "mean": "444", "stdev": "3802" }, { "name": "Var6323", "index": "39", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "3", "mean": "0", "stdev": "0" }, { "name": "Var6367", "index": "40", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "6", "mean": "0", "stdev": "0" }, { "name": "Var6723", "index": "41", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "3", "mean": "0", "stdev": "0" }, { "name": "Var6738", "index": "42", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var6785", "index": "43", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "5", "mean": "0", "stdev": "0" }, { "name": "Var6815", "index": "44", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var6845", "index": "45", "type": "numeric", "distinct": "13", "missing": "1979", "min": "0", "max": "145", "mean": "49", "stdev": "40" }, { "name": "Var7016", "index": "46", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var7216", "index": "47", "type": "numeric", "distinct": "5", "missing": "0", "min": "0", "max": "8", "mean": "0", "stdev": "1" }, { "name": "Var7411", "index": "48", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "9", "mean": "0", "stdev": "2" }, { "name": "Var7468", "index": "49", "type": "numeric", "distinct": "33", "missing": "0", "min": "0", "max": "6496", "mean": "21", "stdev": "251" }, { "name": "Var7591", "index": "50", "type": "numeric", "distinct": "6", "missing": "0", "min": "0", "max": "25", "mean": "0", "stdev": "1" }, { "name": "Var7602", "index": "51", "type": "numeric", "distinct": "12", "missing": "0", "min": "0", "max": "77", "mean": "9", "stdev": "19" }, { "name": "Var7624", "index": "52", "type": "numeric", "distinct": "7", "missing": "0", "min": "0", "max": "81", "mean": "1", "stdev": "3" }, { "name": "Var7685", "index": "53", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "2", "mean": "0", "stdev": "0" }, { "name": "Var7878", "index": "54", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "162", "mean": "0", "stdev": "4" }, { "name": "Var7993", "index": "55", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var8055", "index": "56", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var8137", "index": "57", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "4", "mean": "0", "stdev": "0" }, { "name": "Var8159", "index": "58", "type": "numeric", "distinct": "9", "missing": "0", "min": "0", "max": "140", "mean": "0", "stdev": "5" }, { "name": "Var8675", "index": "59", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "26", "mean": "0", "stdev": "1" }, { "name": "Var8842", "index": "60", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var9131", "index": "61", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "9", "mean": "1", "stdev": "2" }, { "name": "Var9285", "index": "62", "type": "numeric", "distinct": "3", "missing": "0", "min": "0", "max": "6", "mean": "0", "stdev": "0" }, { "name": "Var9555", "index": "63", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "3", "mean": "0", "stdev": "0" }, { "name": "Var9560", "index": "64", "type": "numeric", "distinct": "19", "missing": "0", "min": "0", "max": "37848", "mean": "69", "stdev": "1134" }, { "name": "Var10050", "index": "65", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var10704", "index": "66", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var10782", "index": "67", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var10801", "index": "68", "type": "numeric", "distinct": "627", "missing": "0", "min": "0", "max": "11654", "mean": "333", "stdev": "787" }, { "name": "Var11140", "index": "69", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "3", "mean": "0", "stdev": "1" }, { "name": "Var11155", "index": "70", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "8", "mean": "0", "stdev": "0" }, { "name": "Var11186", "index": "71", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "7", "mean": "0", "stdev": "2" }, { "name": "Var11196", "index": "72", "type": "numeric", "distinct": "689", "missing": "0", "min": "0", "max": "484536", "mean": "15784", "stdev": "36349" }, { "name": "Var11235", "index": "73", "type": "numeric", "distinct": "1452", "missing": "0", "min": "0", "max": "12096000", "mean": "1047075", "stdev": "1158768" }, { "name": "Var11480", "index": "74", "type": "numeric", "distinct": "1723", "missing": "0", "min": "0", "max": "457168000", "mean": "9452570", "stdev": "30855181" }, { "name": "Var11511", "index": "75", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "4", "mean": "0", "stdev": "0" }, { "name": "Var11568", "index": "76", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var11711", "index": "77", "type": "numeric", "distinct": "1670", "missing": "0", "min": "0", "max": "81563000", "mean": "1937001", "stdev": "5412814" }, { "name": "Var11998", "index": "78", "type": "numeric", "distinct": "6", "missing": "0", "min": "0", "max": "198", "mean": "0", "stdev": "5" }, { "name": "Var12142", "index": "79", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var12208", "index": "80", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "2", "mean": "0", "stdev": "0" }, { "name": "Var12236", "index": "81", "type": "numeric", "distinct": "7", "missing": "0", "min": "0", "max": "42", "mean": "0", "stdev": "2" }, { "name": "Var12285", "index": "82", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var12443", "index": "83", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "9", "mean": "0", "stdev": "0" }, { "name": "Var12529", "index": "84", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var12713", "index": "85", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var12853", "index": "86", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "2", "mean": "0", "stdev": "0" }, { "name": "Var12895", "index": "87", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var12998", "index": "88", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "9", "mean": "0", "stdev": "0" }, { "name": "Var13437", "index": "89", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "4", "mean": "0", "stdev": "0" }, { "name": "Var13668", "index": "90", "type": "numeric", "distinct": "33", "missing": "0", "min": "0", "max": "1683", "mean": "21", "stdev": "56" }, { "name": "Var13766", "index": "91", "type": "numeric", "distinct": "4", "missing": "0", "min": "0", "max": "36", "mean": "0", "stdev": "1" }, { "name": "Var14075", "index": "92", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "8", "mean": "0", "stdev": "0" }, { "name": "Var14098", "index": "93", "type": "numeric", "distinct": "4", "missing": "0", "min": "0", "max": "72", "mean": "0", "stdev": "2" }, { "name": "Var14309", "index": "94", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var14443", "index": "95", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "1", "mean": "0", "stdev": "0" }, { "name": "Var14520", "index": "96", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var14592", "index": "97", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var14641", "index": "98", "type": "numeric", "distinct": "1", "missing": "0", "min": "0", "max": "0", "mean": "0", "stdev": "0" }, { "name": "Var14939", "index": "99", "type": "nominal", "distinct": "12", "missing": "1740", "distr": [ [ "3etZFJ2gQVi1emU10V0", "4AizcpGiuhJsP", "9F7LEvBeB0q4R", "KOfIRODN2FCqWZwCRfXdncCcz", "RLHltmR", "SqpkO8nRiyoKKLNd", "_RNhO3I_cAT9M", "_xSZM1atC8kWhNy0", "_xSZM1atCbL2haQd", "buO2Bo5M5H7jF_lkkNO4cz", "buO2Bo5M5H7jIPukkNOpBS", "buOo5VyHlH7jF_lkkNEzQZ", "cE4X", "jDxmyC3", "n1awviuhnNeFBYgBnYc", "voKwQjsCcNcA9691", "x6AOvnFe1gi7M57V", "yrziykAEPHD1yF_1LMTg_fb20" ], [ [ "5", "1" ], [ "80", "6" ], [ "21", "0" ], [ "19", "1" ], [ "1", "0" ], [ "0", "0" ], [ "0", "0" ], [ "52", "4" ], [ "5", "0" ], [ "19", "2" ], [ "0", "0" ], [ "8", "3" ], [ "1", "0" ], [ "0", "0" ], [ "26", "0" ], [ "6", "0" ], [ "0", "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 }