terrasensetk.utils package¶
Submodules¶
terrasensetk.utils.ArgChecker module¶
terrasensetk.utils.Results module¶
-
class
terrasensetk.utils.Results.
Results
(x_test, y_test, x_train, y_train, model, features, parameters, ids_train, ids_test, study=None)[source]¶ Bases:
object
Class used by the experiment to return all the information needed to perform further data analysis.
-
property
features
¶ Gets the features
-
property
ids_test
¶ The Range of indices for the test eopatches
-
property
ids_train
¶ The Range of indices for the train eopatches
-
property
model
¶ Gets the model
-
property
parameters
¶ Get the models parameters
-
property
study
¶ The Hyperoptimization study
-
property
x_test
¶ Gets the x_test
-
property
x_train
¶ Gets the x_train
-
property
y_pred
¶ Get the corresponding prediction for x_test
-
property
y_test
¶ Gets the y_test aka groundtruth
-
property
y_train
¶ Gets the y_train
-
property
terrasensetk.utils.eotasks module¶
-
class
terrasensetk.utils.eotasks.
AddIndicesTask
(*args: Any, **kwargs: Any)[source]¶ Bases:
eolearn.core.
-
class
terrasensetk.utils.eotasks.
CountValid
(*args: Any, **kwargs: Any)[source]¶ Bases:
eolearn.core.
The task counts number of valid observations in time-series and stores the results in the timeless mask.
-
class
terrasensetk.utils.eotasks.
EuclideanNorm
(*args: Any, **kwargs: Any)[source]¶ Bases:
eolearn.core.
The tasks calculates Euclidian Norm of all bands within an array: norm = sqrt(sum_i Bi**2), where Bi are the individual bands within user-specified feature array.
-
class
terrasensetk.utils.eotasks.
InterpolationTask
(*args: Any, **kwargs: Any)[source]¶ Bases:
eolearn.core.
terrasensetk.utils.filtervectortoraster module¶
terrasensetk.utils.utils module¶
-
terrasensetk.utils.utils.
get_time_interval
(middle_date, number_of_days)[source]¶ Gets the time interval surrounding the middle date separated by slashes
- Parameters
middle_date – A string containing the date which will be included in the timerange
number_of_days – The number of days counting from the middle_date that will correspond to the min and max date
- Returns
A list with the ´number_of_days´ before and after of the ´middle_date´
Example
>>> get_time_interval("15/09/1998", 3) >>> ['1998-09-12', '1998-09-18']