Datasets:
Update durhamtrees.py
Browse files- durhamtrees.py +14 -17
durhamtrees.py
CHANGED
@@ -52,9 +52,10 @@ class DurhamTrees(GeneratorBasedBuilder):
|
|
52 |
super().__init__(**kwargs)
|
53 |
|
54 |
BUILDER_CONFIGS = [
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
58 |
|
59 |
|
60 |
def _info(self):
|
@@ -219,21 +220,17 @@ class DurhamTrees(GeneratorBasedBuilder):
|
|
219 |
|
220 |
|
221 |
|
222 |
-
# Create an instance of the DurhamTrees class
|
223 |
-
|
224 |
|
225 |
-
# Build the dataset
|
226 |
-
|
227 |
|
228 |
-
# Access the dataset
|
229 |
-
|
230 |
|
|
|
|
|
231 |
|
232 |
-
#
|
233 |
-
|
234 |
-
|
235 |
-
# Build the dataset for the new instance
|
236 |
-
durham_trees_dataset_another.download_and_prepare()
|
237 |
-
|
238 |
-
# Access the dataset for the new instance
|
239 |
-
dataset_another = durham_trees_dataset_another.as_dataset()
|
|
|
52 |
super().__init__(**kwargs)
|
53 |
|
54 |
BUILDER_CONFIGS = [
|
55 |
+
MyConfig(name="class1_domain1", description="this is combined of csv and geojson"),
|
56 |
+
MyConfig(name="class2_domain1", description="this is csv file"),
|
57 |
+
MyConfig(name="default", description="Default configuration"),
|
58 |
+
]
|
59 |
|
60 |
|
61 |
def _info(self):
|
|
|
220 |
|
221 |
|
222 |
|
223 |
+
# Create an instance of the DurhamTrees class for the default configuration
|
224 |
+
durham_trees_dataset_default = DurhamTrees(name='default')
|
225 |
|
226 |
+
# Build the dataset for the default instance
|
227 |
+
durham_trees_dataset_default.download_and_prepare()
|
228 |
|
229 |
+
# Access the dataset for the default instance
|
230 |
+
dataset_default = durham_trees_dataset_default.as_dataset()
|
231 |
|
232 |
+
# Display the available splits for the default configuration
|
233 |
+
print(dataset_default)
|
234 |
|
235 |
+
# Perform correlation analysis on the default configuration
|
236 |
+
durham_trees_dataset_default._correlation_analysis(df=pd.DataFrame(dataset_default['train']))
|
|
|
|
|
|
|
|
|
|
|
|