{ "data_id": "44784", "name": "porto-seguro_seed_1_nrows_2000_nclasses_10_ncols_100_stratify_True", "exact_name": "porto-seguro_seed_1_nrows_2000_nclasses_10_ncols_100_stratify_True", "version": 1, "version_label": "4d2d9749-877d-4c0b-ad65-bc733587193b", "description": "Subsampling of the dataset porto-seguro (42742) 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:54:41", "update_comment": null, "last_update": "2022-11-17 18:54:41", "licence": "Public", "status": "active", "error_message": null, "url": "https:\/\/api.openml.org\/data\/download\/22111546\/dataset", "default_target_attribute": "target", "row_id_attribute": null, "ignore_attribute": null, "runs": 0, "suggest": { "input": [ "porto-seguro_seed_1_nrows_2000_nclasses_10_ncols_100_stratify_True", "Subsampling of the dataset porto-seguro (42742) 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.cho " ], "weight": 5 }, "qualities": { "NumberOfInstances": 2000, "NumberOfFeatures": 58, "NumberOfClasses": 2, "NumberOfMissingValues": 2775, "NumberOfInstancesWithMissingValues": 1545, "NumberOfNumericFeatures": 26, "NumberOfSymbolicFeatures": 32, "Dimensionality": 0.029, "PercentageOfNumericFeatures": 44.827586206896555, "MajorityClassPercentage": 96.35000000000001, "PercentageOfSymbolicFeatures": 55.172413793103445, "MajorityClassSize": 1927, "MinorityClassPercentage": 3.65, "MinorityClassSize": 73, "NumberOfBinaryFeatures": 24, "PercentageOfBinaryFeatures": 41.37931034482759, "PercentageOfInstancesWithMissingValues": 77.25, "AutoCorrelation": 0.9299649824912456, "PercentageOfMissingValues": 2.3922413793103448 }, "tags": [ { "uploader": "38960", "tag": "Statistics" } ], "features": [ { "name": "target", "index": "57", "type": "nominal", "distinct": "2", "missing": "0", "target": "1", "distr": [ [ "0", "1" ], [ [ "1927", "0" ], [ "0", "73" ] ] ] }, { "name": "ps_ind_01", "index": "0", "type": "numeric", "distinct": "8", "missing": "0", "min": "0", "max": "7", "mean": "2", "stdev": "2" }, { "name": "ps_ind_02_cat", "index": "1", "type": "nominal", "distinct": "4", "missing": "2", "distr": [ [ "1", "2", "3", "4" ], [ [ "1384", "39" ], [ "419", "23" ], [ "87", "9" ], [ "35", "2" ] ] ] }, { "name": "ps_ind_03", "index": "2", "type": "numeric", "distinct": "12", "missing": "0", "min": "0", "max": "11", "mean": "4", "stdev": "3" }, { "name": "ps_ind_04_cat", "index": "3", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "0", "1" ], [ [ "1091", "37" ], [ "836", "36" ] ] ] }, { "name": "ps_ind_05_cat", "index": "4", "type": "nominal", "distinct": "7", "missing": "18", "distr": [ [ "0", "1", "2", "3", "4", "5", "6" ], [ [ "1706", "61" ], [ "29", "1" ], [ "13", "0" ], [ "27", "0" ], [ "52", "1" ], [ "5", "0" ], [ "79", "8" ] ] ] }, { "name": "ps_ind_06_bin", "index": "5", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "0", "1" ], [ [ "1190", "54" ], [ "737", "19" ] ] ] }, { "name": "ps_ind_07_bin", "index": "6", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "0", "1" ], [ [ "1455", "45" ], [ "472", "28" ] ] ] }, { "name": "ps_ind_08_bin", "index": "7", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "0", "1" ], [ [ "1593", "59" ], [ "334", "14" ] ] ] }, { "name": "ps_ind_09_bin", "index": "8", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "0", "1" ], [ [ "1543", "61" ], [ "384", "12" ] ] ] }, { "name": "ps_ind_10_bin", "index": "9", "type": "nominal", "distinct": "1", "missing": "0", "distr": [ [ "0", "1" ], [ [ "1927", "73" ], [ "0", "0" ] ] ] }, { "name": "ps_ind_11_bin", "index": "10", "type": "nominal", "distinct": "1", "missing": "0", "distr": [ [ "0", "1" ], [ [ "1927", "73" ], [ "0", "0" ] ] ] }, { "name": "ps_ind_12_bin", "index": "11", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "0", "1" ], [ [ "1912", "73" ], [ "15", "0" ] ] ] }, { "name": "ps_ind_13_bin", "index": "12", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "0", "1" ], [ [ "1923", "73" ], [ "4", "0" ] ] ] }, { "name": "ps_ind_14", "index": "13", "type": "numeric", "distinct": "2", "missing": "0", "min": "0", "max": "1", "mean": "0", "stdev": "0" }, { "name": "ps_ind_15", "index": "14", "type": "numeric", "distinct": "14", "missing": "0", "min": "0", "max": "13", "mean": "7", "stdev": "4" }, { "name": "ps_ind_16_bin", "index": "15", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "0", "1" ], [ [ "686", "27" ], [ "1241", "46" ] ] ] }, { "name": "ps_ind_17_bin", "index": "16", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "0", "1" ], [ [ "1693", "56" ], [ "234", "17" ] ] ] }, { "name": "ps_ind_18_bin", "index": "17", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "0", "1" ], [ [ "1619", "65" ], [ "308", "8" ] ] ] }, { "name": "ps_reg_01", "index": "18", "type": "numeric", "distinct": "10", "missing": "0", "min": "0", "max": "1", "mean": "1", "stdev": "0" }, { "name": "ps_reg_02", "index": "19", "type": "numeric", "distinct": "19", "missing": "0", "min": "0", "max": "2", "mean": "0", "stdev": "0" }, { "name": "ps_reg_03", "index": "20", "type": "numeric", "distinct": "1144", "missing": "347", "min": "0", "max": "2", "mean": "1", "stdev": "0" }, { "name": "ps_car_01_cat", "index": "21", "type": "nominal", "distinct": "12", "missing": "0", "distr": [ [ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11" ], [ [ "14", "3" ], [ "8", "1" ], [ "6", "0" ], [ "19", "0" ], [ "85", "7" ], [ "62", "1" ], [ "222", "5" ], [ "569", "23" ], [ "52", "3" ], [ "76", "1" ], [ "152", "5" ], [ "662", "24" ] ] ] }, { "name": "ps_car_02_cat", "index": "22", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "0", "1" ], [ [ "302", "14" ], [ "1625", "59" ] ] ] }, { "name": "ps_car_03_cat", "index": "23", "type": "nominal", "distinct": "2", "missing": "1361", "distr": [ [ "0", "1" ], [ [ "212", "13" ], [ "400", "14" ] ] ] }, { "name": "ps_car_04_cat", "index": "24", "type": "nominal", "distinct": "9", "missing": "0", "distr": [ [ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" ], [ [ "1614", "58" ], [ "99", "6" ], [ "86", "1" ], [ "1", "0" ], [ "0", "0" ], [ "1", "0" ], [ "9", "0" ], [ "0", "1" ], [ "61", "3" ], [ "56", "4" ] ] ] }, { "name": "ps_car_05_cat", "index": "25", "type": "nominal", "distinct": "2", "missing": "866", "distr": [ [ "0", "1" ], [ [ "527", "24" ], [ "560", "23" ] ] ] }, { "name": "ps_car_06_cat", "index": "26", "type": "nominal", "distinct": "18", "missing": "0", "distr": [ [ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17" ], [ [ "372", "10" ], [ "391", "14" ], [ "7", "1" ], [ "44", "2" ], [ "112", "5" ], [ "4", "0" ], [ "55", "3" ], [ "43", "5" ], [ "5", "1" ], [ "47", "4" ], [ "114", "1" ], [ "413", "12" ], [ "6", "1" ], [ "15", "0" ], [ "201", "8" ], [ "63", "4" ], [ "14", "1" ], [ "21", "1" ] ] ] }, { "name": "ps_car_07_cat", "index": "27", "type": "nominal", "distinct": "2", "missing": "38", "distr": [ [ "0", "1" ], [ [ "96", "4" ], [ "1797", "65" ] ] ] }, { "name": "ps_car_08_cat", "index": "28", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "0", "1" ], [ [ "361", "19" ], [ "1566", "54" ] ] ] }, { "name": "ps_car_09_cat", "index": "29", "type": "nominal", "distinct": "5", "missing": "3", "distr": [ [ "0", "1", "2", "3", "4" ], [ [ "611", "21" ], [ "103", "8" ], [ "1152", "40" ], [ "48", "2" ], [ "11", "1" ] ] ] }, { "name": "ps_car_10_cat", "index": "30", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "0", "1", "2" ], [ [ "9", "1" ], [ "1918", "72" ], [ "0", "0" ] ] ] }, { "name": "ps_car_11_cat", "index": "31", "type": "nominal", "distinct": "104", "missing": "0", "distr": [ [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "100", "101", "102", "103", "104" ], [ [ "14", "0" ], [ "9", "1" ], [ "13", "0" ], [ "6", "0" ], [ "37", "2" ], [ "8", "1" ], [ "15", "1" ], [ "9", "0" ], [ "8", "1" ], [ "32", "2" ], [ "18", "1" ], [ "23", "2" ], [ "12", "1" ], [ "7", "0" ], [ "4", "0" ], [ "16", "2" ], [ "15", "0" ], [ "3", "0" ], [ "14", "0" ], [ "1", "0" ], [ "7", "1" ], [ "32", "1" ], [ "7", "0" ], [ "8", "0" ], [ "17", "0" ], [ "14", "0" ], [ "15", "2" ], [ "44", "1" ], [ "23", "0" ], [ "3", "0" ], [ "13", "0" ], [ "38", "1" ], [ "4", "0" ], [ "20", "1" ], [ "4", "0" ], [ "7", "1" ], [ "10", "1" ], [ "36", "1" ], [ "21", "0" ], [ "15", "1" ], [ "6", "0" ], [ "23", "0" ], [ "11", "0" ], [ "24", "0" ], [ "11", "0" ], [ "20", "1" ], [ "6", "0" ], [ "19", "0" ], [ "13", "1" ], [ "10", "0" ], [ "17", "1" ], [ "9", "0" ], [ "10", "0" ], [ "10", "0" ], [ "22", "0" ], [ "6", "1" ], [ "12", "0" ], [ "5", "1" ], [ "6", "0" ], [ "29", "3" ], [ "6", "2" ], [ "7", "0" ], [ "1", "0" ], [ "81", "5" ], [ "37", "0" ], [ "12", "0" ], [ "22", "0" ], [ "29", "2" ], [ "7", "0" ], [ "23", "1" ], [ "5", "0" ], [ "4", "1" ], [ "4", "1" ], [ "11", "0" ], [ "4", "0" ], [ "7", "1" ], [ "7", "0" ], [ "23", "0" ], [ "8", "2" ], [ "11", "2" ], [ "5", "0" ], [ "42", "1" ], [ "26", "0" ], [ "16", "0" ], [ "26", "0" ], [ "10", "0" ], [ "65", "2" ], [ "17", "0" ], [ "16", "0" ], [ "12", "0" ], [ "11", "1" ], [ "18", "1" ], [ "9", "0" ], [ "17", "0" ], [ "13", "0" ], [ "2", "0" ], [ "6", "0" ], [ "9", "2" ], [ "37", "0" ], [ "22", "1" ], [ "19", "1" ], [ "8", "0" ], [ "83", "2" ], [ "258", "12" ] ] ] }, { "name": "ps_car_11", "index": "32", "type": "numeric", "distinct": "4", "missing": "0", "min": "0", "max": "3", "mean": "2", "stdev": "1" }, { "name": "ps_car_12", "index": "33", "type": "numeric", "distinct": "56", "missing": "0", "min": "0", "max": "1", "mean": "0", "stdev": "0" }, { "name": "ps_car_13", "index": "34", "type": "numeric", "distinct": "1847", "missing": "0", "min": "0", "max": "2", "mean": "1", "stdev": "0" }, { "name": "ps_car_14", "index": "35", "type": "numeric", "distinct": "348", "missing": "140", "min": "0", "max": "1", "mean": "0", "stdev": "0" }, { "name": "ps_car_15", "index": "36", "type": "numeric", "distinct": "15", "missing": "0", "min": "0", "max": "4", "mean": "3", "stdev": "1" }, { "name": "ps_calc_01", "index": "37", "type": "numeric", "distinct": "10", "missing": "0", "min": "0", "max": "1", "mean": "0", "stdev": "0" }, { "name": "ps_calc_02", "index": "38", "type": "numeric", "distinct": "10", "missing": "0", "min": "0", "max": "1", "mean": "0", "stdev": "0" }, { "name": "ps_calc_03", "index": "39", "type": "numeric", "distinct": "10", "missing": "0", "min": "0", "max": "1", "mean": "0", "stdev": "0" }, { "name": "ps_calc_04", "index": "40", "type": "numeric", "distinct": "6", "missing": "0", "min": "0", "max": "5", "mean": "2", "stdev": "1" }, { "name": "ps_calc_05", "index": "41", "type": "numeric", "distinct": "7", "missing": "0", "min": "0", "max": "6", "mean": "2", "stdev": "1" }, { "name": "ps_calc_06", "index": "42", "type": "numeric", "distinct": "8", "missing": "0", "min": "3", "max": "10", "mean": "8", "stdev": "1" }, { "name": "ps_calc_07", "index": "43", "type": "numeric", "distinct": "9", "missing": "0", "min": "0", "max": "8", "mean": "3", "stdev": "1" }, { "name": "ps_calc_08", "index": "44", "type": "numeric", "distinct": "9", "missing": "0", "min": "4", "max": "12", "mean": "9", "stdev": "1" }, { "name": "ps_calc_09", "index": "45", "type": "numeric", "distinct": "7", "missing": "0", "min": "0", "max": "6", "mean": "2", "stdev": "1" }, { "name": "ps_calc_10", "index": "46", "type": "numeric", "distinct": "20", "missing": "0", "min": "0", "max": "19", "mean": "8", "stdev": "3" }, { "name": "ps_calc_11", "index": "47", "type": "numeric", "distinct": "16", "missing": "0", "min": "0", "max": "15", "mean": "5", "stdev": "2" }, { "name": "ps_calc_12", "index": "48", "type": "numeric", "distinct": "8", "missing": "0", "min": "0", "max": "7", "mean": "1", "stdev": "1" }, { "name": "ps_calc_13", "index": "49", "type": "numeric", "distinct": "11", "missing": "0", "min": "0", "max": "10", "mean": "3", "stdev": "2" }, { "name": "ps_calc_14", "index": "50", "type": "numeric", "distinct": "18", "missing": "0", "min": "1", "max": "20", "mean": "8", "stdev": "3" }, { "name": "ps_calc_15_bin", "index": "51", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "0", "1" ], [ [ "1670", "63" ], [ "257", "10" ] ] ] }, { "name": "ps_calc_16_bin", "index": "52", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "0", "1" ], [ [ "734", "26" ], [ "1193", "47" ] ] ] }, { "name": "ps_calc_17_bin", "index": "53", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "0", "1" ], [ [ "865", "31" ], [ "1062", "42" ] ] ] }, { "name": "ps_calc_18_bin", "index": "54", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "0", "1" ], [ [ "1374", "55" ], [ "553", "18" ] ] ] }, { "name": "ps_calc_19_bin", "index": "55", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "0", "1" ], [ [ "1238", "45" ], [ "689", "28" ] ] ] }, { "name": "ps_calc_20_bin", "index": "56", "type": "nominal", "distinct": "2", "missing": "0", "distr": [ [ "0", "1" ], [ [ "1646", "59" ], [ "281", "14" ] ] ] } ], "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 }