Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F110967372
make_ds_mask.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Apr 28, 23:57
Size
728 B
Mime Type
text/x-python
Expires
Wed, Apr 30, 23:57 (2 d)
Engine
blob
Format
Raw Data
Handle
25843106
Attached To
R8800 solar_potential
make_ds_mask.py
View Options
#!/usr/bin/env python
import
numpy
as
np
import
pandas
as
pd
import
xarray
as
xr
import
os
import
sys
import
time
from
features
import
Training
,
Testing
data_path
=
sys
.
argv
[
1
]
dataset
=
sys
.
argv
[
2
]
features
=
sys
.
argv
[
3
]
.
split
(
","
)
targets
=
sys
.
argv
[
4
]
.
split
(
","
)
mask
=
sys
.
argv
[
5
]
val_ratio
=
float
(
sys
.
argv
[
6
])
year
=
2001
# set location masks for the training and test
train_locs
=
"locations/"
+
mask
+
"_train.txt"
test_locs
=
"locations/"
+
mask
+
"_test.txt"
new_set
=
Training
(
data_path
,
dataset
,
features
,
targets
)
new_set
.
make_dataset
(
year
=
year
,
sample_name
=
train_locs
,
test_name
=
test_locs
)
new_set
.
normalize_all
(
feature_norm
=
'mean'
,
target_norm
=
'mean'
,
val_ratio
=
val_ratio
,
force_normalization
=
True
)
Event Timeline
Log In to Comment