{ "data_id": "44464", "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": "db33e0ea-eacb-46c8-aca6-75750191153d", "description": "Subsampling of the dataset KDDCup09_upselling (44186) 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:03:42", "update_comment": null, "last_update": "2022-11-17 18:03:42", "licence": "Public", "status": "active", "error_message": null, "url": "https:\/\/api.openml.org\/data\/download\/22111226\/dataset", "kaggle_url": null, "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 (44186) 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": 50, "NumberOfClasses": 2, "NumberOfMissingValues": 0, "NumberOfInstancesWithMissingValues": 0, "NumberOfNumericFeatures": 34, "NumberOfSymbolicFeatures": 16, "PercentageOfBinaryFeatures": 6, "PercentageOfInstancesWithMissingValues": 0, "PercentageOfMissingValues": 0, "AutoCorrelation": 0.5172586293146574, "PercentageOfNumericFeatures": 68, "Dimensionality": 0.025, "PercentageOfSymbolicFeatures": 32, "MajorityClassPercentage": 50, "MajorityClassSize": 1000, "MinorityClassPercentage": 50, "MinorityClassSize": 1000, "NumberOfBinaryFeatures": 3 }, "tags": [], "features": [ { "name": "UPSELLING", "index": "49", "type": "nominal", "distinct": "2", "missing": "0", "target": "1", "distr": [ [ "-1", "1" ], [ [ "1000", "0" ], [ "0", "1000" ] ] ] }, { "name": "Var6", "index": "0", "type": "numeric", "distinct": "527", "missing": "0", "min": "0", "max": "23254", "mean": "1392", "stdev": "1923" }, { "name": "Var13", "index": "1", "type": "numeric", "distinct": "668", "missing": "0", "min": "0", "max": "49292", "mean": "1116", "stdev": "2264" }, { "name": "Var21", "index": "2", "type": "numeric", "distinct": "248", "missing": "0", "min": "4", "max": "7444", "mean": "259", "stdev": "443" }, { "name": "Var22", "index": "3", "type": "numeric", "distinct": "248", "missing": "0", "min": "5", "max": "9305", "mean": "323", "stdev": "554" }, { "name": "Var24", "index": "4", "type": "numeric", "distinct": "37", "missing": "0", "min": "0", "max": "174", "mean": "5", "stdev": "10" }, { "name": "Var25", "index": "5", "type": "numeric", "distinct": "105", "missing": "0", "min": "0", "max": "2704", "mean": "116", "stdev": "192" }, { "name": "Var28", "index": "6", "type": "numeric", "distinct": "435", "missing": "0", "min": "0", "max": "1260", "mean": "212", "stdev": "80" }, { "name": "Var35", "index": "7", "type": "numeric", "distinct": "10", "missing": "0", "min": "0", "max": "110", "mean": "1", "stdev": "4" }, { "name": "Var38", "index": "8", "type": "numeric", "distinct": "1569", "missing": "0", "min": "0", "max": "16788840", "mean": "2414369", "stdev": "2942025" }, { "name": "Var57", "index": "9", "type": "numeric", "distinct": "1938", "missing": "0", "min": "0", "max": "7", "mean": "4", "stdev": "2" }, { "name": "Var65", "index": "10", "type": "numeric", "distinct": "11", "missing": "0", "min": "9", "max": "108", "mean": "15", "stdev": "10" }, { "name": "Var73", "index": "11", "type": "numeric", "distinct": "110", "missing": "0", "min": "12", "max": "240", "mean": "74", "stdev": "51" }, { "name": "Var74", "index": "12", "type": "numeric", "distinct": "128", "missing": "0", "min": "0", "max": "4928", "mean": "94", "stdev": "242" }, { "name": "Var76", "index": "13", "type": "numeric", "distinct": "1595", "missing": "0", "min": "0", "max": "19353600", "mean": "1447922", "stdev": "1798410" }, { "name": "Var78", "index": "14", "type": "numeric", "distinct": "8", "missing": "0", "min": "0", "max": "21", "mean": "0", "stdev": "2" }, { "name": "Var81", "index": "15", "type": "numeric", "distinct": "2000", "missing": "0", "min": "512", "max": "955380", "mean": "91596", "stdev": "98150" }, { "name": "Var83", "index": "16", "type": "numeric", "distinct": "54", "missing": "0", "min": "0", "max": "1150", "mean": "20", "stdev": "56" }, { "name": "Var85", "index": "17", "type": "numeric", "distinct": "58", "missing": "0", "min": "0", "max": "424", "mean": "10", "stdev": "20" }, { "name": "Var109", "index": "18", "type": "numeric", "distinct": "73", "missing": "0", "min": "0", "max": "2640", "mean": "67", "stdev": "124" }, { "name": "Var112", "index": "19", "type": "numeric", "distinct": "81", "missing": "0", "min": "0", "max": "2696", "mean": "79", "stdev": "144" }, { "name": "Var113", "index": "20", "type": "numeric", "distinct": "1997", "missing": "0", "min": "-2574396", "max": "6832520", "mean": "-13644", "stdev": "476154" }, { "name": "Var119", "index": "21", "type": "numeric", "distinct": "485", "missing": "0", "min": "10", "max": "47045", "mean": "965", "stdev": "1697" }, { "name": "Var123", "index": "22", "type": "numeric", "distinct": "84", "missing": "0", "min": "0", "max": "2514", "mean": "58", "stdev": "136" }, { "name": "Var125", "index": "23", "type": "numeric", "distinct": "1305", "missing": "0", "min": "0", "max": "2325267", "mean": "29033", "stdev": "93927" }, { "name": "Var126", "index": "24", "type": "numeric", "distinct": "51", "missing": "0", "min": "-32", "max": "68", "mean": "-4", "stdev": "26" }, { "name": "Var132", "index": "25", "type": "numeric", "distinct": "14", "missing": "0", "min": "0", "max": "184", "mean": "3", "stdev": "10" }, { "name": "Var133", "index": "26", "type": "numeric", "distinct": "1871", "missing": "0", "min": "0", "max": "13236650", "mean": "2142226", "stdev": "2283225" }, { "name": "Var134", "index": "27", "type": "numeric", "distinct": "1739", "missing": "0", "min": "0", "max": "5725300", "mean": "433328", "stdev": "599494" }, { "name": "Var140", "index": "28", "type": "numeric", "distinct": "647", "missing": "0", "min": "0", "max": "30310", "mean": "1319", "stdev": "2814" }, { "name": "Var144", "index": "29", "type": "numeric", "distinct": "8", "missing": "0", "min": "0", "max": "63", "mean": "11", "stdev": "11" }, { "name": "Var149", "index": "30", "type": "numeric", "distinct": "1114", "missing": "0", "min": "0", "max": "12700800", "mean": "272676", "stdev": "548459" }, { "name": "Var153", "index": "31", "type": "numeric", "distinct": "1983", "missing": "0", "min": "736", "max": "13167720", "mean": "5882861", "stdev": "4255702" }, { "name": "Var160", "index": "32", "type": "numeric", "distinct": "136", "missing": "0", "min": "0", "max": "1836", "mean": "43", "stdev": "87" }, { "name": "Var163", "index": "33", "type": "numeric", "distinct": "1343", "missing": "0", "min": "0", "max": "10886400", "mean": "469810", "stdev": "802452" }, { "name": "Var194", "index": "34", "type": "nominal", "distinct": "4", "missing": "0", "distr": [ [ "0", "1", "2", "3" ], [ [ "3", "3" ], [ "251", "255" ], [ "2", "8" ], [ "744", "734" ] ] ] }, { "name": "Var196", "index": "35", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "0", "1", "3" ], [ [ "998", "994" ], [ "0", "0" ], [ "2", "6" ] ] ] }, { "name": "Var201", "index": "36", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "1", "2" ], [ [ "256", "266" ], [ "744", "734" ] ] ] }, { "name": "Var203", "index": "37", "type": "nominal", "distinct": "4", "missing": "0", "distr": [ [ "0", "1", "2", "5" ], [ [ "922", "903" ], [ "23", "25" ], [ "51", "72" ], [ "4", "0" ] ] ] }, { "name": "Var205", "index": "38", "type": "nominal", "distinct": "4", "missing": "0", "distr": [ [ "0", "1", "2", "3" ], [ [ "242", "270" ], [ "646", "623" ], [ "86", "73" ], [ "26", "34" ] ] ] }, { "name": "Var207", "index": "39", "type": "nominal", "distinct": "9", "missing": "0", "distr": [ [ "0", "1", "10", "13", "2", "3", "4", "5", "6", "7", "8", "9" ], [ [ "0", "0" ], [ "0", "0" ], [ "713", "653" ], [ "0", "0" ], [ "0", "1" ], [ "2", "2" ], [ "136", "173" ], [ "64", "80" ], [ "1", "1" ], [ "20", "25" ], [ "35", "42" ], [ "29", "23" ] ] ] }, { "name": "Var208", "index": "40", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "933", "919" ], [ "63", "81" ], [ "4", "0" ] ] ] }, { "name": "Var210", "index": "41", "type": "nominal", "distinct": "5", "missing": "0", "distr": [ [ "0", "1", "2", "3", "5" ], [ [ "1", "0" ], [ "8", "0" ], [ "1", "5" ], [ "22", "5" ], [ "968", "990" ] ] ] }, { "name": "Var211", "index": "42", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "0", "1" ], [ [ "778", "991" ], [ "222", "9" ] ] ] }, { "name": "Var218", "index": "43", "type": "nominal", "distinct": "3", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "503", "371" ], [ "487", "610" ], [ "10", "19" ] ] ] }, { "name": "Var221", "index": "44", "type": "nominal", "distinct": "7", "missing": "0", "distr": [ [ "0", "1", "2", "3", "4", "5", "6" ], [ [ "29", "38" ], [ "2", "2" ], [ "33", "44" ], [ "59", "74" ], [ "751", "697" ], [ "4", "2" ], [ "122", "143" ] ] ] }, { "name": "Var223", "index": "45", "type": "nominal", "distinct": "5", "missing": "0", "distr": [ [ "0", "1", "2", "3", "4" ], [ [ "762", "788" ], [ "35", "28" ], [ "3", "2" ], [ "124", "127" ], [ "76", "55" ] ] ] }, { "name": "Var225", "index": "46", "type": "nominal", "distinct": "4", "missing": "0", "distr": [ [ "0", "1", "2", "3" ], [ [ "239", "349" ], [ "203", "202" ], [ "53", "64" ], [ "505", "385" ] ] ] }, { "name": "Var227", "index": "47", "type": "nominal", "distinct": "7", "missing": "0", "distr": [ [ "0", "1", "2", "3", "4", "5", "6" ], [ [ "38", "43" ], [ "67", "68" ], [ "713", "654" ], [ "123", "149" ], [ "47", "63" ], [ "0", "1" ], [ "12", "22" ] ] ] }, { "name": "Var229", "index": "48", "type": "nominal", "distinct": "5", "missing": "0", "distr": [ [ "0", "1", "2", "3", "4" ], [ [ "249", "298" ], [ "196", "250" ], [ "2", "2" ], [ "1", "2" ], [ "552", "448" ] ] ] } ], "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 }