partition stringclasses 3
values | func_name stringlengths 1 134 | docstring stringlengths 1 46.9k | path stringlengths 4 223 | original_string stringlengths 75 104k | code stringlengths 75 104k | docstring_tokens listlengths 1 1.97k | repo stringlengths 7 55 | language stringclasses 1
value | url stringlengths 87 315 | code_tokens listlengths 19 28.4k | sha stringlengths 40 40 |
|---|---|---|---|---|---|---|---|---|---|---|---|
train | sync_user_email_addresses | Keep user.email in sync with user.emailaddress_set.
Under some circumstances the user.email may not have ended up as
an EmailAddress record, e.g. in the case of manually created admin
users. | allauth/account/utils.py | def sync_user_email_addresses(user):
"""
Keep user.email in sync with user.emailaddress_set.
Under some circumstances the user.email may not have ended up as
an EmailAddress record, e.g. in the case of manually created admin
users.
"""
from .models import EmailAddress
email = user_email... | def sync_user_email_addresses(user):
"""
Keep user.email in sync with user.emailaddress_set.
Under some circumstances the user.email may not have ended up as
an EmailAddress record, e.g. in the case of manually created admin
users.
"""
from .models import EmailAddress
email = user_email... | [
"Keep",
"user",
".",
"email",
"in",
"sync",
"with",
"user",
".",
"emailaddress_set",
"."
] | pennersr/django-allauth | python | https://github.com/pennersr/django-allauth/blob/f70cb3d622f992f15fe9b57098e0b328445b664e/allauth/account/utils.py#L335-L354 | [
"def",
"sync_user_email_addresses",
"(",
"user",
")",
":",
"from",
".",
"models",
"import",
"EmailAddress",
"email",
"=",
"user_email",
"(",
"user",
")",
"if",
"email",
"and",
"not",
"EmailAddress",
".",
"objects",
".",
"filter",
"(",
"user",
"=",
"user",
... | f70cb3d622f992f15fe9b57098e0b328445b664e |
train | filter_users_by_email | Return list of users by email address
Typically one, at most just a few in length. First we look through
EmailAddress table, than customisable User model table. Add results
together avoiding SQL joins and deduplicate. | allauth/account/utils.py | def filter_users_by_email(email):
"""Return list of users by email address
Typically one, at most just a few in length. First we look through
EmailAddress table, than customisable User model table. Add results
together avoiding SQL joins and deduplicate.
"""
from .models import EmailAddress
... | def filter_users_by_email(email):
"""Return list of users by email address
Typically one, at most just a few in length. First we look through
EmailAddress table, than customisable User model table. Add results
together avoiding SQL joins and deduplicate.
"""
from .models import EmailAddress
... | [
"Return",
"list",
"of",
"users",
"by",
"email",
"address"
] | pennersr/django-allauth | python | https://github.com/pennersr/django-allauth/blob/f70cb3d622f992f15fe9b57098e0b328445b664e/allauth/account/utils.py#L373-L387 | [
"def",
"filter_users_by_email",
"(",
"email",
")",
":",
"from",
".",
"models",
"import",
"EmailAddress",
"User",
"=",
"get_user_model",
"(",
")",
"mails",
"=",
"EmailAddress",
".",
"objects",
".",
"filter",
"(",
"email__iexact",
"=",
"email",
")",
"users",
"... | f70cb3d622f992f15fe9b57098e0b328445b664e |
train | user_pk_to_url_str | This should return a string. | allauth/account/utils.py | def user_pk_to_url_str(user):
"""
This should return a string.
"""
User = get_user_model()
if issubclass(type(User._meta.pk), models.UUIDField):
if isinstance(user.pk, six.string_types):
return user.pk
return user.pk.hex
ret = user.pk
if isinstance(ret, six.integ... | def user_pk_to_url_str(user):
"""
This should return a string.
"""
User = get_user_model()
if issubclass(type(User._meta.pk), models.UUIDField):
if isinstance(user.pk, six.string_types):
return user.pk
return user.pk.hex
ret = user.pk
if isinstance(ret, six.integ... | [
"This",
"should",
"return",
"a",
"string",
"."
] | pennersr/django-allauth | python | https://github.com/pennersr/django-allauth/blob/f70cb3d622f992f15fe9b57098e0b328445b664e/allauth/account/utils.py#L398-L411 | [
"def",
"user_pk_to_url_str",
"(",
"user",
")",
":",
"User",
"=",
"get_user_model",
"(",
")",
"if",
"issubclass",
"(",
"type",
"(",
"User",
".",
"_meta",
".",
"pk",
")",
",",
"models",
".",
"UUIDField",
")",
":",
"if",
"isinstance",
"(",
"user",
".",
... | f70cb3d622f992f15fe9b57098e0b328445b664e |
train | setup_dummy_social_apps | `allauth` needs tokens for OAuth based providers. So let's
setup some dummy tokens | example/example/demo/apps.py | def setup_dummy_social_apps(sender, **kwargs):
"""
`allauth` needs tokens for OAuth based providers. So let's
setup some dummy tokens
"""
from allauth.socialaccount.providers import registry
from allauth.socialaccount.models import SocialApp
from allauth.socialaccount.providers.oauth.provide... | def setup_dummy_social_apps(sender, **kwargs):
"""
`allauth` needs tokens for OAuth based providers. So let's
setup some dummy tokens
"""
from allauth.socialaccount.providers import registry
from allauth.socialaccount.models import SocialApp
from allauth.socialaccount.providers.oauth.provide... | [
"allauth",
"needs",
"tokens",
"for",
"OAuth",
"based",
"providers",
".",
"So",
"let",
"s",
"setup",
"some",
"dummy",
"tokens"
] | pennersr/django-allauth | python | https://github.com/pennersr/django-allauth/blob/f70cb3d622f992f15fe9b57098e0b328445b664e/example/example/demo/apps.py#L7-L35 | [
"def",
"setup_dummy_social_apps",
"(",
"sender",
",",
"*",
"*",
"kwargs",
")",
":",
"from",
"allauth",
".",
"socialaccount",
".",
"providers",
"import",
"registry",
"from",
"allauth",
".",
"socialaccount",
".",
"models",
"import",
"SocialApp",
"from",
"allauth",... | f70cb3d622f992f15fe9b57098e0b328445b664e |
train | JSONField.value_from_object | Return value dumped to string. | allauth/socialaccount/fields.py | def value_from_object(self, obj):
"""Return value dumped to string."""
val = super(JSONField, self).value_from_object(obj)
return self.get_prep_value(val) | def value_from_object(self, obj):
"""Return value dumped to string."""
val = super(JSONField, self).value_from_object(obj)
return self.get_prep_value(val) | [
"Return",
"value",
"dumped",
"to",
"string",
"."
] | pennersr/django-allauth | python | https://github.com/pennersr/django-allauth/blob/f70cb3d622f992f15fe9b57098e0b328445b664e/allauth/socialaccount/fields.py#L54-L57 | [
"def",
"value_from_object",
"(",
"self",
",",
"obj",
")",
":",
"val",
"=",
"super",
"(",
"JSONField",
",",
"self",
")",
".",
"value_from_object",
"(",
"obj",
")",
"return",
"self",
".",
"get_prep_value",
"(",
"val",
")"
] | f70cb3d622f992f15fe9b57098e0b328445b664e |
train | AppSettings.EMAIL_VERIFICATION | See e-mail verification method | allauth/account/app_settings.py | def EMAIL_VERIFICATION(self):
"""
See e-mail verification method
"""
ret = self._setting("EMAIL_VERIFICATION",
self.EmailVerificationMethod.OPTIONAL)
# Deal with legacy (boolean based) setting
if ret is True:
ret = self.EmailVerific... | def EMAIL_VERIFICATION(self):
"""
See e-mail verification method
"""
ret = self._setting("EMAIL_VERIFICATION",
self.EmailVerificationMethod.OPTIONAL)
# Deal with legacy (boolean based) setting
if ret is True:
ret = self.EmailVerific... | [
"See",
"e",
"-",
"mail",
"verification",
"method"
] | pennersr/django-allauth | python | https://github.com/pennersr/django-allauth/blob/f70cb3d622f992f15fe9b57098e0b328445b664e/allauth/account/app_settings.py#L91-L102 | [
"def",
"EMAIL_VERIFICATION",
"(",
"self",
")",
":",
"ret",
"=",
"self",
".",
"_setting",
"(",
"\"EMAIL_VERIFICATION\"",
",",
"self",
".",
"EmailVerificationMethod",
".",
"OPTIONAL",
")",
"# Deal with legacy (boolean based) setting",
"if",
"ret",
"is",
"True",
":",
... | f70cb3d622f992f15fe9b57098e0b328445b664e |
train | AppSettings.PASSWORD_MIN_LENGTH | Minimum password Length | allauth/account/app_settings.py | def PASSWORD_MIN_LENGTH(self):
"""
Minimum password Length
"""
from django.conf import settings
ret = None
if not settings.AUTH_PASSWORD_VALIDATORS:
ret = self._setting("PASSWORD_MIN_LENGTH", 6)
return ret | def PASSWORD_MIN_LENGTH(self):
"""
Minimum password Length
"""
from django.conf import settings
ret = None
if not settings.AUTH_PASSWORD_VALIDATORS:
ret = self._setting("PASSWORD_MIN_LENGTH", 6)
return ret | [
"Minimum",
"password",
"Length"
] | pennersr/django-allauth | python | https://github.com/pennersr/django-allauth/blob/f70cb3d622f992f15fe9b57098e0b328445b664e/allauth/account/app_settings.py#L140-L148 | [
"def",
"PASSWORD_MIN_LENGTH",
"(",
"self",
")",
":",
"from",
"django",
".",
"conf",
"import",
"settings",
"ret",
"=",
"None",
"if",
"not",
"settings",
".",
"AUTH_PASSWORD_VALIDATORS",
":",
"ret",
"=",
"self",
".",
"_setting",
"(",
"\"PASSWORD_MIN_LENGTH\"",
",... | f70cb3d622f992f15fe9b57098e0b328445b664e |
train | _function_with_partly_reduce | Small helper function to call a function (map_function)
on a list of data chunks (chunk_list) and convert the results into
a flattened list.
This function is used to send chunks of data with a size larger than 1 to
the workers in parallel and process these on the worker.
:param chunk_list: A l... | tsfresh/utilities/distribution.py | def _function_with_partly_reduce(chunk_list, map_function, kwargs):
"""
Small helper function to call a function (map_function)
on a list of data chunks (chunk_list) and convert the results into
a flattened list.
This function is used to send chunks of data with a size larger than 1 to
the ... | def _function_with_partly_reduce(chunk_list, map_function, kwargs):
"""
Small helper function to call a function (map_function)
on a list of data chunks (chunk_list) and convert the results into
a flattened list.
This function is used to send chunks of data with a size larger than 1 to
the ... | [
"Small",
"helper",
"function",
"to",
"call",
"a",
"function",
"(",
"map_function",
")",
"on",
"a",
"list",
"of",
"data",
"chunks",
"(",
"chunk_list",
")",
"and",
"convert",
"the",
"results",
"into",
"a",
"flattened",
"list",
".",
"This",
"function",
"is",
... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/distribution.py#L19-L39 | [
"def",
"_function_with_partly_reduce",
"(",
"chunk_list",
",",
"map_function",
",",
"kwargs",
")",
":",
"kwargs",
"=",
"kwargs",
"or",
"{",
"}",
"results",
"=",
"(",
"map_function",
"(",
"chunk",
",",
"*",
"*",
"kwargs",
")",
"for",
"chunk",
"in",
"chunk_l... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | DistributorBaseClass.partition | This generator chunks a list of data into slices of length chunk_size. If the chunk_size is not a divider of the
data length, the last slice will be shorter than chunk_size.
:param data: The data to chunk.
:type data: list
:param chunk_size: Each chunks size. The last chunk may be small... | tsfresh/utilities/distribution.py | def partition(data, chunk_size):
"""
This generator chunks a list of data into slices of length chunk_size. If the chunk_size is not a divider of the
data length, the last slice will be shorter than chunk_size.
:param data: The data to chunk.
:type data: list
:param chun... | def partition(data, chunk_size):
"""
This generator chunks a list of data into slices of length chunk_size. If the chunk_size is not a divider of the
data length, the last slice will be shorter than chunk_size.
:param data: The data to chunk.
:type data: list
:param chun... | [
"This",
"generator",
"chunks",
"a",
"list",
"of",
"data",
"into",
"slices",
"of",
"length",
"chunk_size",
".",
"If",
"the",
"chunk_size",
"is",
"not",
"a",
"divider",
"of",
"the",
"data",
"length",
"the",
"last",
"slice",
"will",
"be",
"shorter",
"than",
... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/distribution.py#L57-L77 | [
"def",
"partition",
"(",
"data",
",",
"chunk_size",
")",
":",
"iterable",
"=",
"iter",
"(",
"data",
")",
"while",
"True",
":",
"next_chunk",
"=",
"list",
"(",
"itertools",
".",
"islice",
"(",
"iterable",
",",
"chunk_size",
")",
")",
"if",
"not",
"next_... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | DistributorBaseClass.calculate_best_chunk_size | Calculates the best chunk size for a list of length data_length. The current implemented formula is more or
less an empirical result for multiprocessing case on one machine.
:param data_length: A length which defines how many calculations there need to be.
:type data_length: int
... | tsfresh/utilities/distribution.py | def calculate_best_chunk_size(self, data_length):
"""
Calculates the best chunk size for a list of length data_length. The current implemented formula is more or
less an empirical result for multiprocessing case on one machine.
:param data_length: A length which defines how man... | def calculate_best_chunk_size(self, data_length):
"""
Calculates the best chunk size for a list of length data_length. The current implemented formula is more or
less an empirical result for multiprocessing case on one machine.
:param data_length: A length which defines how man... | [
"Calculates",
"the",
"best",
"chunk",
"size",
"for",
"a",
"list",
"of",
"length",
"data_length",
".",
"The",
"current",
"implemented",
"formula",
"is",
"more",
"or",
"less",
"an",
"empirical",
"result",
"for",
"multiprocessing",
"case",
"on",
"one",
"machine",... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/distribution.py#L85-L100 | [
"def",
"calculate_best_chunk_size",
"(",
"self",
",",
"data_length",
")",
":",
"chunk_size",
",",
"extra",
"=",
"divmod",
"(",
"data_length",
",",
"self",
".",
"n_workers",
"*",
"5",
")",
"if",
"extra",
":",
"chunk_size",
"+=",
"1",
"return",
"chunk_size"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | DistributorBaseClass.map_reduce | This method contains the core functionality of the DistributorBaseClass class.
It maps the map_function to each element of the data and reduces the results to return a flattened list.
How the jobs are calculated, is determined by the classes
:func:`tsfresh.utilities.distribution.Distr... | tsfresh/utilities/distribution.py | def map_reduce(self, map_function, data, function_kwargs=None, chunk_size=None, data_length=None):
"""
This method contains the core functionality of the DistributorBaseClass class.
It maps the map_function to each element of the data and reduces the results to return a flattened list.
... | def map_reduce(self, map_function, data, function_kwargs=None, chunk_size=None, data_length=None):
"""
This method contains the core functionality of the DistributorBaseClass class.
It maps the map_function to each element of the data and reduces the results to return a flattened list.
... | [
"This",
"method",
"contains",
"the",
"core",
"functionality",
"of",
"the",
"DistributorBaseClass",
"class",
".",
"It",
"maps",
"the",
"map_function",
"to",
"each",
"element",
"of",
"the",
"data",
"and",
"reduces",
"the",
"results",
"to",
"return",
"a",
"flatte... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/distribution.py#L102-L151 | [
"def",
"map_reduce",
"(",
"self",
",",
"map_function",
",",
"data",
",",
"function_kwargs",
"=",
"None",
",",
"chunk_size",
"=",
"None",
",",
"data_length",
"=",
"None",
")",
":",
"if",
"data_length",
"is",
"None",
":",
"data_length",
"=",
"len",
"(",
"d... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | MapDistributor.distribute | Calculates the features in a sequential fashion by pythons map command
:param func: the function to send to each worker.
:type func: callable
:param partitioned_chunks: The list of data chunks - each element is again
a list of chunks - and should be processed by one worker.
... | tsfresh/utilities/distribution.py | def distribute(self, func, partitioned_chunks, kwargs):
"""
Calculates the features in a sequential fashion by pythons map command
:param func: the function to send to each worker.
:type func: callable
:param partitioned_chunks: The list of data chunks - each element is again
... | def distribute(self, func, partitioned_chunks, kwargs):
"""
Calculates the features in a sequential fashion by pythons map command
:param func: the function to send to each worker.
:type func: callable
:param partitioned_chunks: The list of data chunks - each element is again
... | [
"Calculates",
"the",
"features",
"in",
"a",
"sequential",
"fashion",
"by",
"pythons",
"map",
"command"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/distribution.py#L195-L210 | [
"def",
"distribute",
"(",
"self",
",",
"func",
",",
"partitioned_chunks",
",",
"kwargs",
")",
":",
"return",
"map",
"(",
"partial",
"(",
"func",
",",
"*",
"*",
"kwargs",
")",
",",
"partitioned_chunks",
")"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | LocalDaskDistributor.distribute | Calculates the features in a parallel fashion by distributing the map command to the dask workers on a local
machine
:param func: the function to send to each worker.
:type func: callable
:param partitioned_chunks: The list of data chunks - each element is again
a list of ch... | tsfresh/utilities/distribution.py | def distribute(self, func, partitioned_chunks, kwargs):
"""
Calculates the features in a parallel fashion by distributing the map command to the dask workers on a local
machine
:param func: the function to send to each worker.
:type func: callable
:param partitioned_chun... | def distribute(self, func, partitioned_chunks, kwargs):
"""
Calculates the features in a parallel fashion by distributing the map command to the dask workers on a local
machine
:param func: the function to send to each worker.
:type func: callable
:param partitioned_chun... | [
"Calculates",
"the",
"features",
"in",
"a",
"parallel",
"fashion",
"by",
"distributing",
"the",
"map",
"command",
"to",
"the",
"dask",
"workers",
"on",
"a",
"local",
"machine"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/distribution.py#L246-L263 | [
"def",
"distribute",
"(",
"self",
",",
"func",
",",
"partitioned_chunks",
",",
"kwargs",
")",
":",
"result",
"=",
"self",
".",
"client",
".",
"gather",
"(",
"self",
".",
"client",
".",
"map",
"(",
"partial",
"(",
"func",
",",
"*",
"*",
"kwargs",
")",... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | ClusterDaskDistributor.calculate_best_chunk_size | Uses the number of dask workers in the cluster (during execution time, meaning when you start the extraction)
to find the optimal chunk_size.
:param data_length: A length which defines how many calculations there need to be.
:type data_length: int | tsfresh/utilities/distribution.py | def calculate_best_chunk_size(self, data_length):
"""
Uses the number of dask workers in the cluster (during execution time, meaning when you start the extraction)
to find the optimal chunk_size.
:param data_length: A length which defines how many calculations there need to be.
... | def calculate_best_chunk_size(self, data_length):
"""
Uses the number of dask workers in the cluster (during execution time, meaning when you start the extraction)
to find the optimal chunk_size.
:param data_length: A length which defines how many calculations there need to be.
... | [
"Uses",
"the",
"number",
"of",
"dask",
"workers",
"in",
"the",
"cluster",
"(",
"during",
"execution",
"time",
"meaning",
"when",
"you",
"start",
"the",
"extraction",
")",
"to",
"find",
"the",
"optimal",
"chunk_size",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/distribution.py#L289-L301 | [
"def",
"calculate_best_chunk_size",
"(",
"self",
",",
"data_length",
")",
":",
"n_workers",
"=",
"len",
"(",
"self",
".",
"client",
".",
"scheduler_info",
"(",
")",
"[",
"\"workers\"",
"]",
")",
"chunk_size",
",",
"extra",
"=",
"divmod",
"(",
"data_length",
... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | MultiprocessingDistributor.distribute | Calculates the features in a parallel fashion by distributing the map command to a thread pool
:param func: the function to send to each worker.
:type func: callable
:param partitioned_chunks: The list of data chunks - each element is again
a list of chunks - and should be processed... | tsfresh/utilities/distribution.py | def distribute(self, func, partitioned_chunks, kwargs):
"""
Calculates the features in a parallel fashion by distributing the map command to a thread pool
:param func: the function to send to each worker.
:type func: callable
:param partitioned_chunks: The list of data chunks - ... | def distribute(self, func, partitioned_chunks, kwargs):
"""
Calculates the features in a parallel fashion by distributing the map command to a thread pool
:param func: the function to send to each worker.
:type func: callable
:param partitioned_chunks: The list of data chunks - ... | [
"Calculates",
"the",
"features",
"in",
"a",
"parallel",
"fashion",
"by",
"distributing",
"the",
"map",
"command",
"to",
"a",
"thread",
"pool"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/distribution.py#L350-L365 | [
"def",
"distribute",
"(",
"self",
",",
"func",
",",
"partitioned_chunks",
",",
"kwargs",
")",
":",
"return",
"self",
".",
"pool",
".",
"imap_unordered",
"(",
"partial",
"(",
"func",
",",
"*",
"*",
"kwargs",
")",
",",
"partitioned_chunks",
")"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | MultiprocessingDistributor.close | Collects the result from the workers and closes the thread pool. | tsfresh/utilities/distribution.py | def close(self):
"""
Collects the result from the workers and closes the thread pool.
"""
self.pool.close()
self.pool.terminate()
self.pool.join() | def close(self):
"""
Collects the result from the workers and closes the thread pool.
"""
self.pool.close()
self.pool.terminate()
self.pool.join() | [
"Collects",
"the",
"result",
"from",
"the",
"workers",
"and",
"closes",
"the",
"thread",
"pool",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/distribution.py#L367-L373 | [
"def",
"close",
"(",
"self",
")",
":",
"self",
".",
"pool",
".",
"close",
"(",
")",
"self",
".",
"pool",
".",
"terminate",
"(",
")",
"self",
".",
"pool",
".",
"join",
"(",
")"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | from_columns | Creates a mapping from kind names to fc_parameters objects
(which are itself mappings from feature calculators to settings)
to extract only the features contained in the columns.
To do so, for every feature name in columns this method
1. split the column name into col, feature, params part
2. decid... | tsfresh/feature_extraction/settings.py | def from_columns(columns, columns_to_ignore=None):
"""
Creates a mapping from kind names to fc_parameters objects
(which are itself mappings from feature calculators to settings)
to extract only the features contained in the columns.
To do so, for every feature name in columns this method
1. sp... | def from_columns(columns, columns_to_ignore=None):
"""
Creates a mapping from kind names to fc_parameters objects
(which are itself mappings from feature calculators to settings)
to extract only the features contained in the columns.
To do so, for every feature name in columns this method
1. sp... | [
"Creates",
"a",
"mapping",
"from",
"kind",
"names",
"to",
"fc_parameters",
"objects",
"(",
"which",
"are",
"itself",
"mappings",
"from",
"feature",
"calculators",
"to",
"settings",
")",
"to",
"extract",
"only",
"the",
"features",
"contained",
"in",
"the",
"col... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/settings.py#L24-L82 | [
"def",
"from_columns",
"(",
"columns",
",",
"columns_to_ignore",
"=",
"None",
")",
":",
"kind_to_fc_parameters",
"=",
"{",
"}",
"if",
"columns_to_ignore",
"is",
"None",
":",
"columns_to_ignore",
"=",
"[",
"]",
"for",
"col",
"in",
"columns",
":",
"if",
"col",... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | _roll | Roll 1D array elements. Improves the performance of numpy.roll() by reducing the overhead introduced from the
flexibility of the numpy.roll() method such as the support for rolling over multiple dimensions.
Elements that roll beyond the last position are re-introduced at the beginning. Similarly, element... | tsfresh/feature_extraction/feature_calculators.py | def _roll(a, shift):
"""
Roll 1D array elements. Improves the performance of numpy.roll() by reducing the overhead introduced from the
flexibility of the numpy.roll() method such as the support for rolling over multiple dimensions.
Elements that roll beyond the last position are re-introduced at ... | def _roll(a, shift):
"""
Roll 1D array elements. Improves the performance of numpy.roll() by reducing the overhead introduced from the
flexibility of the numpy.roll() method such as the support for rolling over multiple dimensions.
Elements that roll beyond the last position are re-introduced at ... | [
"Roll",
"1D",
"array",
"elements",
".",
"Improves",
"the",
"performance",
"of",
"numpy",
".",
"roll",
"()",
"by",
"reducing",
"the",
"overhead",
"introduced",
"from",
"the",
"flexibility",
"of",
"the",
"numpy",
".",
"roll",
"()",
"method",
"such",
"as",
"t... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L35-L78 | [
"def",
"_roll",
"(",
"a",
",",
"shift",
")",
":",
"if",
"not",
"isinstance",
"(",
"a",
",",
"np",
".",
"ndarray",
")",
":",
"a",
"=",
"np",
".",
"asarray",
"(",
"a",
")",
"idx",
"=",
"shift",
"%",
"len",
"(",
"a",
")",
"return",
"np",
".",
... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | _get_length_sequences_where | This method calculates the length of all sub-sequences where the array x is either True or 1.
Examples
--------
>>> x = [0,1,0,0,1,1,1,0,0,1,0,1,1]
>>> _get_length_sequences_where(x)
>>> [1, 3, 1, 2]
>>> x = [0,True,0,0,True,True,True,0,0,True,0,True,True]
>>> _get_length_sequences_where(x... | tsfresh/feature_extraction/feature_calculators.py | def _get_length_sequences_where(x):
"""
This method calculates the length of all sub-sequences where the array x is either True or 1.
Examples
--------
>>> x = [0,1,0,0,1,1,1,0,0,1,0,1,1]
>>> _get_length_sequences_where(x)
>>> [1, 3, 1, 2]
>>> x = [0,True,0,0,True,True,True,0,0,True,0,... | def _get_length_sequences_where(x):
"""
This method calculates the length of all sub-sequences where the array x is either True or 1.
Examples
--------
>>> x = [0,1,0,0,1,1,1,0,0,1,0,1,1]
>>> _get_length_sequences_where(x)
>>> [1, 3, 1, 2]
>>> x = [0,True,0,0,True,True,True,0,0,True,0,... | [
"This",
"method",
"calculates",
"the",
"length",
"of",
"all",
"sub",
"-",
"sequences",
"where",
"the",
"array",
"x",
"is",
"either",
"True",
"or",
"1",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L81-L107 | [
"def",
"_get_length_sequences_where",
"(",
"x",
")",
":",
"if",
"len",
"(",
"x",
")",
"==",
"0",
":",
"return",
"[",
"0",
"]",
"else",
":",
"res",
"=",
"[",
"len",
"(",
"list",
"(",
"group",
")",
")",
"for",
"value",
",",
"group",
"in",
"itertool... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | _estimate_friedrich_coefficients | Coefficients of polynomial :math:`h(x)`, which has been fitted to
the deterministic dynamics of Langevin model
.. math::
\dot{x}(t) = h(x(t)) + \mathcal{N}(0,R)
As described by
Friedrich et al. (2000): Physics Letters A 271, p. 217-222
*Extracting model equations from experimental ... | tsfresh/feature_extraction/feature_calculators.py | def _estimate_friedrich_coefficients(x, m, r):
"""
Coefficients of polynomial :math:`h(x)`, which has been fitted to
the deterministic dynamics of Langevin model
.. math::
\dot{x}(t) = h(x(t)) + \mathcal{N}(0,R)
As described by
Friedrich et al. (2000): Physics Letters A 271, p. 217... | def _estimate_friedrich_coefficients(x, m, r):
"""
Coefficients of polynomial :math:`h(x)`, which has been fitted to
the deterministic dynamics of Langevin model
.. math::
\dot{x}(t) = h(x(t)) + \mathcal{N}(0,R)
As described by
Friedrich et al. (2000): Physics Letters A 271, p. 217... | [
"Coefficients",
"of",
"polynomial",
":",
"math",
":",
"h",
"(",
"x",
")",
"which",
"has",
"been",
"fitted",
"to",
"the",
"deterministic",
"dynamics",
"of",
"Langevin",
"model",
"..",
"math",
"::",
"\\",
"dot",
"{",
"x",
"}",
"(",
"t",
")",
"=",
"h",
... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L110-L150 | [
"def",
"_estimate_friedrich_coefficients",
"(",
"x",
",",
"m",
",",
"r",
")",
":",
"assert",
"m",
">",
"0",
",",
"\"Order of polynomial need to be positive integer, found {}\"",
".",
"format",
"(",
"m",
")",
"df",
"=",
"pd",
".",
"DataFrame",
"(",
"{",
"'signa... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | _aggregate_on_chunks | Takes the time series x and constructs a lower sampled version of it by applying the aggregation function f_agg on
consecutive chunks of length chunk_len
:param x: the time series to calculate the aggregation of
:type x: numpy.ndarray
:param f_agg: The name of the aggregation function that should be an... | tsfresh/feature_extraction/feature_calculators.py | def _aggregate_on_chunks(x, f_agg, chunk_len):
"""
Takes the time series x and constructs a lower sampled version of it by applying the aggregation function f_agg on
consecutive chunks of length chunk_len
:param x: the time series to calculate the aggregation of
:type x: numpy.ndarray
:param f_... | def _aggregate_on_chunks(x, f_agg, chunk_len):
"""
Takes the time series x and constructs a lower sampled version of it by applying the aggregation function f_agg on
consecutive chunks of length chunk_len
:param x: the time series to calculate the aggregation of
:type x: numpy.ndarray
:param f_... | [
"Takes",
"the",
"time",
"series",
"x",
"and",
"constructs",
"a",
"lower",
"sampled",
"version",
"of",
"it",
"by",
"applying",
"the",
"aggregation",
"function",
"f_agg",
"on",
"consecutive",
"chunks",
"of",
"length",
"chunk_len"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L153-L167 | [
"def",
"_aggregate_on_chunks",
"(",
"x",
",",
"f_agg",
",",
"chunk_len",
")",
":",
"return",
"[",
"getattr",
"(",
"x",
"[",
"i",
"*",
"chunk_len",
":",
"(",
"i",
"+",
"1",
")",
"*",
"chunk_len",
"]",
",",
"f_agg",
")",
"(",
")",
"for",
"i",
"in",... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | set_property | This method returns a decorator that sets the property key of the function to value | tsfresh/feature_extraction/feature_calculators.py | def set_property(key, value):
"""
This method returns a decorator that sets the property key of the function to value
"""
def decorate_func(func):
setattr(func, key, value)
if func.__doc__ and key == "fctype":
func.__doc__ = func.__doc__ + "\n\n *This function is of type: ... | def set_property(key, value):
"""
This method returns a decorator that sets the property key of the function to value
"""
def decorate_func(func):
setattr(func, key, value)
if func.__doc__ and key == "fctype":
func.__doc__ = func.__doc__ + "\n\n *This function is of type: ... | [
"This",
"method",
"returns",
"a",
"decorator",
"that",
"sets",
"the",
"property",
"key",
"of",
"the",
"function",
"to",
"value"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L170-L179 | [
"def",
"set_property",
"(",
"key",
",",
"value",
")",
":",
"def",
"decorate_func",
"(",
"func",
")",
":",
"setattr",
"(",
"func",
",",
"key",
",",
"value",
")",
"if",
"func",
".",
"__doc__",
"and",
"key",
"==",
"\"fctype\"",
":",
"func",
".",
"__doc_... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | variance_larger_than_standard_deviation | Boolean variable denoting if the variance of x is greater than its standard deviation. Is equal to variance of x
being larger than 1
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: bool | tsfresh/feature_extraction/feature_calculators.py | def variance_larger_than_standard_deviation(x):
"""
Boolean variable denoting if the variance of x is greater than its standard deviation. Is equal to variance of x
being larger than 1
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this featur... | def variance_larger_than_standard_deviation(x):
"""
Boolean variable denoting if the variance of x is greater than its standard deviation. Is equal to variance of x
being larger than 1
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this featur... | [
"Boolean",
"variable",
"denoting",
"if",
"the",
"variance",
"of",
"x",
"is",
"greater",
"than",
"its",
"standard",
"deviation",
".",
"Is",
"equal",
"to",
"variance",
"of",
"x",
"being",
"larger",
"than",
"1"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L183-L194 | [
"def",
"variance_larger_than_standard_deviation",
"(",
"x",
")",
":",
"y",
"=",
"np",
".",
"var",
"(",
"x",
")",
"return",
"y",
">",
"np",
".",
"sqrt",
"(",
"y",
")"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | ratio_beyond_r_sigma | Ratio of values that are more than r*std(x) (so r sigma) away from the mean of x.
:param x: the time series to calculate the feature of
:type x: iterable
:return: the value of this feature
:return type: float | tsfresh/feature_extraction/feature_calculators.py | def ratio_beyond_r_sigma(x, r):
"""
Ratio of values that are more than r*std(x) (so r sigma) away from the mean of x.
:param x: the time series to calculate the feature of
:type x: iterable
:return: the value of this feature
:return type: float
"""
if not isinstance(x, (np.ndarray, pd.S... | def ratio_beyond_r_sigma(x, r):
"""
Ratio of values that are more than r*std(x) (so r sigma) away from the mean of x.
:param x: the time series to calculate the feature of
:type x: iterable
:return: the value of this feature
:return type: float
"""
if not isinstance(x, (np.ndarray, pd.S... | [
"Ratio",
"of",
"values",
"that",
"are",
"more",
"than",
"r",
"*",
"std",
"(",
"x",
")",
"(",
"so",
"r",
"sigma",
")",
"away",
"from",
"the",
"mean",
"of",
"x",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L198-L209 | [
"def",
"ratio_beyond_r_sigma",
"(",
"x",
",",
"r",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"return",
"np",
".",
"sum"... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | large_standard_deviation | Boolean variable denoting if the standard dev of x is higher
than 'r' times the range = difference between max and min of x.
Hence it checks if
.. math::
std(x) > r * (max(X)-min(X))
According to a rule of the thumb, the standard deviation should be a forth of the range of the values.
:p... | tsfresh/feature_extraction/feature_calculators.py | def large_standard_deviation(x, r):
"""
Boolean variable denoting if the standard dev of x is higher
than 'r' times the range = difference between max and min of x.
Hence it checks if
.. math::
std(x) > r * (max(X)-min(X))
According to a rule of the thumb, the standard deviation shoul... | def large_standard_deviation(x, r):
"""
Boolean variable denoting if the standard dev of x is higher
than 'r' times the range = difference between max and min of x.
Hence it checks if
.. math::
std(x) > r * (max(X)-min(X))
According to a rule of the thumb, the standard deviation shoul... | [
"Boolean",
"variable",
"denoting",
"if",
"the",
"standard",
"dev",
"of",
"x",
"is",
"higher",
"than",
"r",
"times",
"the",
"range",
"=",
"difference",
"between",
"max",
"and",
"min",
"of",
"x",
".",
"Hence",
"it",
"checks",
"if"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L213-L234 | [
"def",
"large_standard_deviation",
"(",
"x",
",",
"r",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"return",
"np",
".",
"... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | symmetry_looking | Boolean variable denoting if the distribution of x *looks symmetric*. This is the case if
.. math::
| mean(X)-median(X)| < r * (max(X)-min(X))
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:param r: the percentage of the range to compare with
:type r: float
... | tsfresh/feature_extraction/feature_calculators.py | def symmetry_looking(x, param):
"""
Boolean variable denoting if the distribution of x *looks symmetric*. This is the case if
.. math::
| mean(X)-median(X)| < r * (max(X)-min(X))
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:param r: the percentage of t... | def symmetry_looking(x, param):
"""
Boolean variable denoting if the distribution of x *looks symmetric*. This is the case if
.. math::
| mean(X)-median(X)| < r * (max(X)-min(X))
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:param r: the percentage of t... | [
"Boolean",
"variable",
"denoting",
"if",
"the",
"distribution",
"of",
"x",
"*",
"looks",
"symmetric",
"*",
".",
"This",
"is",
"the",
"case",
"if"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L238-L258 | [
"def",
"symmetry_looking",
"(",
"x",
",",
"param",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"mean_median_difference",
"=",... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | has_duplicate_max | Checks if the maximum value of x is observed more than once
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: bool | tsfresh/feature_extraction/feature_calculators.py | def has_duplicate_max(x):
"""
Checks if the maximum value of x is observed more than once
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: bool
"""
if not isinstance(x, (np.ndarray, pd.Series)):
x = np.... | def has_duplicate_max(x):
"""
Checks if the maximum value of x is observed more than once
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: bool
"""
if not isinstance(x, (np.ndarray, pd.Series)):
x = np.... | [
"Checks",
"if",
"the",
"maximum",
"value",
"of",
"x",
"is",
"observed",
"more",
"than",
"once"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L262-L273 | [
"def",
"has_duplicate_max",
"(",
"x",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"return",
"np",
".",
"sum",
"(",
"x",
... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | has_duplicate_min | Checks if the minimal value of x is observed more than once
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: bool | tsfresh/feature_extraction/feature_calculators.py | def has_duplicate_min(x):
"""
Checks if the minimal value of x is observed more than once
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: bool
"""
if not isinstance(x, (np.ndarray, pd.Series)):
x = np.... | def has_duplicate_min(x):
"""
Checks if the minimal value of x is observed more than once
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: bool
"""
if not isinstance(x, (np.ndarray, pd.Series)):
x = np.... | [
"Checks",
"if",
"the",
"minimal",
"value",
"of",
"x",
"is",
"observed",
"more",
"than",
"once"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L277-L288 | [
"def",
"has_duplicate_min",
"(",
"x",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"return",
"np",
".",
"sum",
"(",
"x",
... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | has_duplicate | Checks if any value in x occurs more than once
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: bool | tsfresh/feature_extraction/feature_calculators.py | def has_duplicate(x):
"""
Checks if any value in x occurs more than once
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: bool
"""
if not isinstance(x, (np.ndarray, pd.Series)):
x = np.asarray(x)
re... | def has_duplicate(x):
"""
Checks if any value in x occurs more than once
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: bool
"""
if not isinstance(x, (np.ndarray, pd.Series)):
x = np.asarray(x)
re... | [
"Checks",
"if",
"any",
"value",
"in",
"x",
"occurs",
"more",
"than",
"once"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L292-L303 | [
"def",
"has_duplicate",
"(",
"x",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"return",
"x",
".",
"size",
"!=",
"np",
"... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | agg_autocorrelation | r"""
Calculates the value of an aggregation function :math:`f_{agg}` (e.g. the variance or the mean) over the
autocorrelation :math:`R(l)` for different lags. The autocorrelation :math:`R(l)` for lag :math:`l` is defined as
.. math::
R(l) = \frac{1}{(n-l)\sigma^{2}} \sum_{t=1}^{n-l}(X_{t}-\mu )(X_... | tsfresh/feature_extraction/feature_calculators.py | def agg_autocorrelation(x, param):
r"""
Calculates the value of an aggregation function :math:`f_{agg}` (e.g. the variance or the mean) over the
autocorrelation :math:`R(l)` for different lags. The autocorrelation :math:`R(l)` for lag :math:`l` is defined as
.. math::
R(l) = \frac{1}{(n-l)\sig... | def agg_autocorrelation(x, param):
r"""
Calculates the value of an aggregation function :math:`f_{agg}` (e.g. the variance or the mean) over the
autocorrelation :math:`R(l)` for different lags. The autocorrelation :math:`R(l)` for lag :math:`l` is defined as
.. math::
R(l) = \frac{1}{(n-l)\sig... | [
"r",
"Calculates",
"the",
"value",
"of",
"an",
"aggregation",
"function",
":",
"math",
":",
"f_",
"{",
"agg",
"}",
"(",
"e",
".",
"g",
".",
"the",
"variance",
"or",
"the",
"mean",
")",
"over",
"the",
"autocorrelation",
":",
"math",
":",
"R",
"(",
"... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L324-L366 | [
"def",
"agg_autocorrelation",
"(",
"x",
",",
"param",
")",
":",
"# if the time series is longer than the following threshold, we use fft to calculate the acf",
"THRESHOLD_TO_USE_FFT",
"=",
"1250",
"var",
"=",
"np",
".",
"var",
"(",
"x",
")",
"n",
"=",
"len",
"(",
"x",... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | partial_autocorrelation | Calculates the value of the partial autocorrelation function at the given lag. The lag `k` partial autocorrelation
of a time series :math:`\\lbrace x_t, t = 1 \\ldots T \\rbrace` equals the partial correlation of :math:`x_t` and
:math:`x_{t-k}`, adjusted for the intermediate variables
:math:`\\lbrace x_{t-1... | tsfresh/feature_extraction/feature_calculators.py | def partial_autocorrelation(x, param):
"""
Calculates the value of the partial autocorrelation function at the given lag. The lag `k` partial autocorrelation
of a time series :math:`\\lbrace x_t, t = 1 \\ldots T \\rbrace` equals the partial correlation of :math:`x_t` and
:math:`x_{t-k}`, adjusted for th... | def partial_autocorrelation(x, param):
"""
Calculates the value of the partial autocorrelation function at the given lag. The lag `k` partial autocorrelation
of a time series :math:`\\lbrace x_t, t = 1 \\ldots T \\rbrace` equals the partial correlation of :math:`x_t` and
:math:`x_{t-k}`, adjusted for th... | [
"Calculates",
"the",
"value",
"of",
"the",
"partial",
"autocorrelation",
"function",
"at",
"the",
"given",
"lag",
".",
"The",
"lag",
"k",
"partial",
"autocorrelation",
"of",
"a",
"time",
"series",
":",
"math",
":",
"\\\\",
"lbrace",
"x_t",
"t",
"=",
"1",
... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L370-L418 | [
"def",
"partial_autocorrelation",
"(",
"x",
",",
"param",
")",
":",
"# Check the difference between demanded lags by param and possible lags to calculate (depends on len(x))",
"max_demanded_lag",
"=",
"max",
"(",
"[",
"lag",
"[",
"\"lag\"",
"]",
"for",
"lag",
"in",
"param",... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | augmented_dickey_fuller | The Augmented Dickey-Fuller test is a hypothesis test which checks whether a unit root is present in a time
series sample. This feature calculator returns the value of the respective test statistic.
See the statsmodels implementation for references and more details.
:param x: the time series to calculate ... | tsfresh/feature_extraction/feature_calculators.py | def augmented_dickey_fuller(x, param):
"""
The Augmented Dickey-Fuller test is a hypothesis test which checks whether a unit root is present in a time
series sample. This feature calculator returns the value of the respective test statistic.
See the statsmodels implementation for references and more de... | def augmented_dickey_fuller(x, param):
"""
The Augmented Dickey-Fuller test is a hypothesis test which checks whether a unit root is present in a time
series sample. This feature calculator returns the value of the respective test statistic.
See the statsmodels implementation for references and more de... | [
"The",
"Augmented",
"Dickey",
"-",
"Fuller",
"test",
"is",
"a",
"hypothesis",
"test",
"which",
"checks",
"whether",
"a",
"unit",
"root",
"is",
"present",
"in",
"a",
"time",
"series",
"sample",
".",
"This",
"feature",
"calculator",
"returns",
"the",
"value",
... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L422-L450 | [
"def",
"augmented_dickey_fuller",
"(",
"x",
",",
"param",
")",
":",
"res",
"=",
"None",
"try",
":",
"res",
"=",
"adfuller",
"(",
"x",
")",
"except",
"LinAlgError",
":",
"res",
"=",
"np",
".",
"NaN",
",",
"np",
".",
"NaN",
",",
"np",
".",
"NaN",
"... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | abs_energy | Returns the absolute energy of the time series which is the sum over the squared values
.. math::
E = \\sum_{i=1,\ldots, n} x_i^2
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float | tsfresh/feature_extraction/feature_calculators.py | def abs_energy(x):
"""
Returns the absolute energy of the time series which is the sum over the squared values
.. math::
E = \\sum_{i=1,\ldots, n} x_i^2
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: fl... | def abs_energy(x):
"""
Returns the absolute energy of the time series which is the sum over the squared values
.. math::
E = \\sum_{i=1,\ldots, n} x_i^2
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: fl... | [
"Returns",
"the",
"absolute",
"energy",
"of",
"the",
"time",
"series",
"which",
"is",
"the",
"sum",
"over",
"the",
"squared",
"values"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L454-L469 | [
"def",
"abs_energy",
"(",
"x",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"return",
"np",
".",
"dot",
"(",
"x",
",",
... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | cid_ce | This function calculator is an estimate for a time series complexity [1] (A more complex time series has more peaks,
valleys etc.). It calculates the value of
.. math::
\\sqrt{ \\sum_{i=0}^{n-2lag} ( x_{i} - x_{i+1})^2 }
.. rubric:: References
| [1] Batista, Gustavo EAPA, et al (2014).
... | tsfresh/feature_extraction/feature_calculators.py | def cid_ce(x, normalize):
"""
This function calculator is an estimate for a time series complexity [1] (A more complex time series has more peaks,
valleys etc.). It calculates the value of
.. math::
\\sqrt{ \\sum_{i=0}^{n-2lag} ( x_{i} - x_{i+1})^2 }
.. rubric:: References
| [1] Bat... | def cid_ce(x, normalize):
"""
This function calculator is an estimate for a time series complexity [1] (A more complex time series has more peaks,
valleys etc.). It calculates the value of
.. math::
\\sqrt{ \\sum_{i=0}^{n-2lag} ( x_{i} - x_{i+1})^2 }
.. rubric:: References
| [1] Bat... | [
"This",
"function",
"calculator",
"is",
"an",
"estimate",
"for",
"a",
"time",
"series",
"complexity",
"[",
"1",
"]",
"(",
"A",
"more",
"complex",
"time",
"series",
"has",
"more",
"peaks",
"valleys",
"etc",
".",
")",
".",
"It",
"calculates",
"the",
"value... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L473-L506 | [
"def",
"cid_ce",
"(",
"x",
",",
"normalize",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"if",
"normalize",
":",
"s",
"... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | mean_second_derivative_central | Returns the mean value of a central approximation of the second derivative
.. math::
\\frac{1}{n} \\sum_{i=1,\ldots, n-1} \\frac{1}{2} (x_{i+2} - 2 \\cdot x_{i+1} + x_i)
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:retur... | tsfresh/feature_extraction/feature_calculators.py | def mean_second_derivative_central(x):
"""
Returns the mean value of a central approximation of the second derivative
.. math::
\\frac{1}{n} \\sum_{i=1,\ldots, n-1} \\frac{1}{2} (x_{i+2} - 2 \\cdot x_{i+1} + x_i)
:param x: the time series to calculate the feature of
:type x: numpy.ndarra... | def mean_second_derivative_central(x):
"""
Returns the mean value of a central approximation of the second derivative
.. math::
\\frac{1}{n} \\sum_{i=1,\ldots, n-1} \\frac{1}{2} (x_{i+2} - 2 \\cdot x_{i+1} + x_i)
:param x: the time series to calculate the feature of
:type x: numpy.ndarra... | [
"Returns",
"the",
"mean",
"value",
"of",
"a",
"central",
"approximation",
"of",
"the",
"second",
"derivative"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L545-L560 | [
"def",
"mean_second_derivative_central",
"(",
"x",
")",
":",
"diff",
"=",
"(",
"_roll",
"(",
"x",
",",
"1",
")",
"-",
"2",
"*",
"np",
".",
"array",
"(",
"x",
")",
"+",
"_roll",
"(",
"x",
",",
"-",
"1",
")",
")",
"/",
"2.0",
"return",
"np",
".... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | skewness | Returns the sample skewness of x (calculated with the adjusted Fisher-Pearson standardized
moment coefficient G1).
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float | tsfresh/feature_extraction/feature_calculators.py | def skewness(x):
"""
Returns the sample skewness of x (calculated with the adjusted Fisher-Pearson standardized
moment coefficient G1).
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float
"""
if not isin... | def skewness(x):
"""
Returns the sample skewness of x (calculated with the adjusted Fisher-Pearson standardized
moment coefficient G1).
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float
"""
if not isin... | [
"Returns",
"the",
"sample",
"skewness",
"of",
"x",
"(",
"calculated",
"with",
"the",
"adjusted",
"Fisher",
"-",
"Pearson",
"standardized",
"moment",
"coefficient",
"G1",
")",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L634-L646 | [
"def",
"skewness",
"(",
"x",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"pd",
".",
"Series",
")",
":",
"x",
"=",
"pd",
".",
"Series",
"(",
"x",
")",
"return",
"pd",
".",
"Series",
".",
"skew",
"(",
"x",
")"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | kurtosis | Returns the kurtosis of x (calculated with the adjusted Fisher-Pearson standardized
moment coefficient G2).
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float | tsfresh/feature_extraction/feature_calculators.py | def kurtosis(x):
"""
Returns the kurtosis of x (calculated with the adjusted Fisher-Pearson standardized
moment coefficient G2).
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float
"""
if not isinstance(... | def kurtosis(x):
"""
Returns the kurtosis of x (calculated with the adjusted Fisher-Pearson standardized
moment coefficient G2).
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float
"""
if not isinstance(... | [
"Returns",
"the",
"kurtosis",
"of",
"x",
"(",
"calculated",
"with",
"the",
"adjusted",
"Fisher",
"-",
"Pearson",
"standardized",
"moment",
"coefficient",
"G2",
")",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L650-L662 | [
"def",
"kurtosis",
"(",
"x",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"pd",
".",
"Series",
")",
":",
"x",
"=",
"pd",
".",
"Series",
"(",
"x",
")",
"return",
"pd",
".",
"Series",
".",
"kurtosis",
"(",
"x",
")"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | longest_strike_below_mean | Returns the length of the longest consecutive subsequence in x that is smaller than the mean of x
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float | tsfresh/feature_extraction/feature_calculators.py | def longest_strike_below_mean(x):
"""
Returns the length of the longest consecutive subsequence in x that is smaller than the mean of x
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float
"""
if not isinstan... | def longest_strike_below_mean(x):
"""
Returns the length of the longest consecutive subsequence in x that is smaller than the mean of x
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float
"""
if not isinstan... | [
"Returns",
"the",
"length",
"of",
"the",
"longest",
"consecutive",
"subsequence",
"in",
"x",
"that",
"is",
"smaller",
"than",
"the",
"mean",
"of",
"x"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L683-L694 | [
"def",
"longest_strike_below_mean",
"(",
"x",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"return",
"np",
".",
"max",
"(",
... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | count_above_mean | Returns the number of values in x that are higher than the mean of x
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float | tsfresh/feature_extraction/feature_calculators.py | def count_above_mean(x):
"""
Returns the number of values in x that are higher than the mean of x
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float
"""
m = np.mean(x)
return np.where(x > m)[0].size | def count_above_mean(x):
"""
Returns the number of values in x that are higher than the mean of x
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float
"""
m = np.mean(x)
return np.where(x > m)[0].size | [
"Returns",
"the",
"number",
"of",
"values",
"in",
"x",
"that",
"are",
"higher",
"than",
"the",
"mean",
"of",
"x"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L713-L723 | [
"def",
"count_above_mean",
"(",
"x",
")",
":",
"m",
"=",
"np",
".",
"mean",
"(",
"x",
")",
"return",
"np",
".",
"where",
"(",
"x",
">",
"m",
")",
"[",
"0",
"]",
".",
"size"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | count_below_mean | Returns the number of values in x that are lower than the mean of x
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float | tsfresh/feature_extraction/feature_calculators.py | def count_below_mean(x):
"""
Returns the number of values in x that are lower than the mean of x
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float
"""
m = np.mean(x)
return np.where(x < m)[0].size | def count_below_mean(x):
"""
Returns the number of values in x that are lower than the mean of x
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float
"""
m = np.mean(x)
return np.where(x < m)[0].size | [
"Returns",
"the",
"number",
"of",
"values",
"in",
"x",
"that",
"are",
"lower",
"than",
"the",
"mean",
"of",
"x"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L727-L737 | [
"def",
"count_below_mean",
"(",
"x",
")",
":",
"m",
"=",
"np",
".",
"mean",
"(",
"x",
")",
"return",
"np",
".",
"where",
"(",
"x",
"<",
"m",
")",
"[",
"0",
"]",
".",
"size"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | last_location_of_maximum | Returns the relative last location of the maximum value of x.
The position is calculated relatively to the length of x.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float | tsfresh/feature_extraction/feature_calculators.py | def last_location_of_maximum(x):
"""
Returns the relative last location of the maximum value of x.
The position is calculated relatively to the length of x.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float
... | def last_location_of_maximum(x):
"""
Returns the relative last location of the maximum value of x.
The position is calculated relatively to the length of x.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float
... | [
"Returns",
"the",
"relative",
"last",
"location",
"of",
"the",
"maximum",
"value",
"of",
"x",
".",
"The",
"position",
"is",
"calculated",
"relatively",
"to",
"the",
"length",
"of",
"x",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L741-L752 | [
"def",
"last_location_of_maximum",
"(",
"x",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"return",
"1.0",
"-",
"np",
".",
"argmax",
"(",
"x",
"[",
":",
":",
"-",
"1",
"]",
")",
"/",
"len",
"(",
"x",
")",
"if",
"len",
"(",
"x",
... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | first_location_of_maximum | Returns the first location of the maximum value of x.
The position is calculated relatively to the length of x.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float | tsfresh/feature_extraction/feature_calculators.py | def first_location_of_maximum(x):
"""
Returns the first location of the maximum value of x.
The position is calculated relatively to the length of x.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float
"""
... | def first_location_of_maximum(x):
"""
Returns the first location of the maximum value of x.
The position is calculated relatively to the length of x.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float
"""
... | [
"Returns",
"the",
"first",
"location",
"of",
"the",
"maximum",
"value",
"of",
"x",
".",
"The",
"position",
"is",
"calculated",
"relatively",
"to",
"the",
"length",
"of",
"x",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L756-L768 | [
"def",
"first_location_of_maximum",
"(",
"x",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"return",
"np",
".",
"argmax",
"(... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | last_location_of_minimum | Returns the last location of the minimal value of x.
The position is calculated relatively to the length of x.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float | tsfresh/feature_extraction/feature_calculators.py | def last_location_of_minimum(x):
"""
Returns the last location of the minimal value of x.
The position is calculated relatively to the length of x.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float
"""
... | def last_location_of_minimum(x):
"""
Returns the last location of the minimal value of x.
The position is calculated relatively to the length of x.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float
"""
... | [
"Returns",
"the",
"last",
"location",
"of",
"the",
"minimal",
"value",
"of",
"x",
".",
"The",
"position",
"is",
"calculated",
"relatively",
"to",
"the",
"length",
"of",
"x",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L772-L783 | [
"def",
"last_location_of_minimum",
"(",
"x",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"return",
"1.0",
"-",
"np",
".",
"argmin",
"(",
"x",
"[",
":",
":",
"-",
"1",
"]",
")",
"/",
"len",
"(",
"x",
")",
"if",
"len",
"(",
"x",
... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | first_location_of_minimum | Returns the first location of the minimal value of x.
The position is calculated relatively to the length of x.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float | tsfresh/feature_extraction/feature_calculators.py | def first_location_of_minimum(x):
"""
Returns the first location of the minimal value of x.
The position is calculated relatively to the length of x.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float
"""
... | def first_location_of_minimum(x):
"""
Returns the first location of the minimal value of x.
The position is calculated relatively to the length of x.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float
"""
... | [
"Returns",
"the",
"first",
"location",
"of",
"the",
"minimal",
"value",
"of",
"x",
".",
"The",
"position",
"is",
"calculated",
"relatively",
"to",
"the",
"length",
"of",
"x",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L787-L799 | [
"def",
"first_location_of_minimum",
"(",
"x",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"return",
"np",
".",
"argmin",
"(... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | percentage_of_reoccurring_datapoints_to_all_datapoints | Returns the percentage of unique values, that are present in the time series
more than once.
len(different values occurring more than once) / len(different values)
This means the percentage is normalized to the number of unique values,
in contrast to the percentage_of_reoccurring_values_to_all_val... | tsfresh/feature_extraction/feature_calculators.py | def percentage_of_reoccurring_datapoints_to_all_datapoints(x):
"""
Returns the percentage of unique values, that are present in the time series
more than once.
len(different values occurring more than once) / len(different values)
This means the percentage is normalized to the number of unique... | def percentage_of_reoccurring_datapoints_to_all_datapoints(x):
"""
Returns the percentage of unique values, that are present in the time series
more than once.
len(different values occurring more than once) / len(different values)
This means the percentage is normalized to the number of unique... | [
"Returns",
"the",
"percentage",
"of",
"unique",
"values",
"that",
"are",
"present",
"in",
"the",
"time",
"series",
"more",
"than",
"once",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L803-L826 | [
"def",
"percentage_of_reoccurring_datapoints_to_all_datapoints",
"(",
"x",
")",
":",
"if",
"len",
"(",
"x",
")",
"==",
"0",
":",
"return",
"np",
".",
"nan",
"unique",
",",
"counts",
"=",
"np",
".",
"unique",
"(",
"x",
",",
"return_counts",
"=",
"True",
"... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | percentage_of_reoccurring_values_to_all_values | Returns the ratio of unique values, that are present in the time series
more than once.
# of data points occurring more than once / # of all data points
This means the ratio is normalized to the number of data points in the time series,
in contrast to the percentage_of_reoccurring_datapoints_to_al... | tsfresh/feature_extraction/feature_calculators.py | def percentage_of_reoccurring_values_to_all_values(x):
"""
Returns the ratio of unique values, that are present in the time series
more than once.
# of data points occurring more than once / # of all data points
This means the ratio is normalized to the number of data points in the time series... | def percentage_of_reoccurring_values_to_all_values(x):
"""
Returns the ratio of unique values, that are present in the time series
more than once.
# of data points occurring more than once / # of all data points
This means the ratio is normalized to the number of data points in the time series... | [
"Returns",
"the",
"ratio",
"of",
"unique",
"values",
"that",
"are",
"present",
"in",
"the",
"time",
"series",
"more",
"than",
"once",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L830-L857 | [
"def",
"percentage_of_reoccurring_values_to_all_values",
"(",
"x",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"pd",
".",
"Series",
")",
":",
"x",
"=",
"pd",
".",
"Series",
"(",
"x",
")",
"if",
"x",
".",
"size",
"==",
"0",
":",
"return",
"np"... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | sum_of_reoccurring_values | Returns the sum of all values, that are present in the time series
more than once.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float | tsfresh/feature_extraction/feature_calculators.py | def sum_of_reoccurring_values(x):
"""
Returns the sum of all values, that are present in the time series
more than once.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float
"""
unique, counts = np.unique... | def sum_of_reoccurring_values(x):
"""
Returns the sum of all values, that are present in the time series
more than once.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float
"""
unique, counts = np.unique... | [
"Returns",
"the",
"sum",
"of",
"all",
"values",
"that",
"are",
"present",
"in",
"the",
"time",
"series",
"more",
"than",
"once",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L861-L874 | [
"def",
"sum_of_reoccurring_values",
"(",
"x",
")",
":",
"unique",
",",
"counts",
"=",
"np",
".",
"unique",
"(",
"x",
",",
"return_counts",
"=",
"True",
")",
"counts",
"[",
"counts",
"<",
"2",
"]",
"=",
"0",
"counts",
"[",
"counts",
">",
"1",
"]",
"... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | sum_of_reoccurring_data_points | Returns the sum of all data points, that are present in the time series
more than once.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float | tsfresh/feature_extraction/feature_calculators.py | def sum_of_reoccurring_data_points(x):
"""
Returns the sum of all data points, that are present in the time series
more than once.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float
"""
unique, counts =... | def sum_of_reoccurring_data_points(x):
"""
Returns the sum of all data points, that are present in the time series
more than once.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
:return type: float
"""
unique, counts =... | [
"Returns",
"the",
"sum",
"of",
"all",
"data",
"points",
"that",
"are",
"present",
"in",
"the",
"time",
"series",
"more",
"than",
"once",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L878-L890 | [
"def",
"sum_of_reoccurring_data_points",
"(",
"x",
")",
":",
"unique",
",",
"counts",
"=",
"np",
".",
"unique",
"(",
"x",
",",
"return_counts",
"=",
"True",
")",
"counts",
"[",
"counts",
"<",
"2",
"]",
"=",
"0",
"return",
"np",
".",
"sum",
"(",
"coun... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | ratio_value_number_to_time_series_length | Returns a factor which is 1 if all values in the time series occur only once,
and below one if this is not the case.
In principle, it just returns
# unique values / # values
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this feature
... | tsfresh/feature_extraction/feature_calculators.py | def ratio_value_number_to_time_series_length(x):
"""
Returns a factor which is 1 if all values in the time series occur only once,
and below one if this is not the case.
In principle, it just returns
# unique values / # values
:param x: the time series to calculate the feature of
:type... | def ratio_value_number_to_time_series_length(x):
"""
Returns a factor which is 1 if all values in the time series occur only once,
and below one if this is not the case.
In principle, it just returns
# unique values / # values
:param x: the time series to calculate the feature of
:type... | [
"Returns",
"a",
"factor",
"which",
"is",
"1",
"if",
"all",
"values",
"in",
"the",
"time",
"series",
"occur",
"only",
"once",
"and",
"below",
"one",
"if",
"this",
"is",
"not",
"the",
"case",
".",
"In",
"principle",
"it",
"just",
"returns"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L894-L912 | [
"def",
"ratio_value_number_to_time_series_length",
"(",
"x",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"if",
"x",
".",
"siz... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | fft_coefficient | Calculates the fourier coefficients of the one-dimensional discrete Fourier Transform for real input by fast
fourier transformation algorithm
.. math::
A_k = \\sum_{m=0}^{n-1} a_m \\exp \\left \\{ -2 \\pi i \\frac{m k}{n} \\right \\}, \\qquad k = 0,
\\ldots , n-1.
The resulting coefficien... | tsfresh/feature_extraction/feature_calculators.py | def fft_coefficient(x, param):
"""
Calculates the fourier coefficients of the one-dimensional discrete Fourier Transform for real input by fast
fourier transformation algorithm
.. math::
A_k = \\sum_{m=0}^{n-1} a_m \\exp \\left \\{ -2 \\pi i \\frac{m k}{n} \\right \\}, \\qquad k = 0,
\... | def fft_coefficient(x, param):
"""
Calculates the fourier coefficients of the one-dimensional discrete Fourier Transform for real input by fast
fourier transformation algorithm
.. math::
A_k = \\sum_{m=0}^{n-1} a_m \\exp \\left \\{ -2 \\pi i \\frac{m k}{n} \\right \\}, \\qquad k = 0,
\... | [
"Calculates",
"the",
"fourier",
"coefficients",
"of",
"the",
"one",
"-",
"dimensional",
"discrete",
"Fourier",
"Transform",
"for",
"real",
"input",
"by",
"fast",
"fourier",
"transformation",
"algorithm"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L916-L956 | [
"def",
"fft_coefficient",
"(",
"x",
",",
"param",
")",
":",
"assert",
"min",
"(",
"[",
"config",
"[",
"\"coeff\"",
"]",
"for",
"config",
"in",
"param",
"]",
")",
">=",
"0",
",",
"\"Coefficients must be positive or zero.\"",
"assert",
"set",
"(",
"[",
"conf... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | fft_aggregated | Returns the spectral centroid (mean), variance, skew, and kurtosis of the absolute fourier transform spectrum.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:param param: contains dictionaries {"aggtype": s} where s str and in ["centroid", "variance",
"skew", "kurtosi... | tsfresh/feature_extraction/feature_calculators.py | def fft_aggregated(x, param):
"""
Returns the spectral centroid (mean), variance, skew, and kurtosis of the absolute fourier transform spectrum.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:param param: contains dictionaries {"aggtype": s} where s str and in ["centr... | def fft_aggregated(x, param):
"""
Returns the spectral centroid (mean), variance, skew, and kurtosis of the absolute fourier transform spectrum.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:param param: contains dictionaries {"aggtype": s} where s str and in ["centr... | [
"Returns",
"the",
"spectral",
"centroid",
"(",
"mean",
")",
"variance",
"skew",
"and",
"kurtosis",
"of",
"the",
"absolute",
"fourier",
"transform",
"spectrum",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L960-L1063 | [
"def",
"fft_aggregated",
"(",
"x",
",",
"param",
")",
":",
"assert",
"set",
"(",
"[",
"config",
"[",
"\"aggtype\"",
"]",
"for",
"config",
"in",
"param",
"]",
")",
"<=",
"set",
"(",
"[",
"\"centroid\"",
",",
"\"variance\"",
",",
"\"skew\"",
",",
"\"kurt... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | number_peaks | Calculates the number of peaks of at least support n in the time series x. A peak of support n is defined as a
subsequence of x where a value occurs, which is bigger than its n neighbours to the left and to the right.
Hence in the sequence
>>> x = [3, 0, 0, 4, 0, 0, 13]
4 is a peak of support 1 and 2... | tsfresh/feature_extraction/feature_calculators.py | def number_peaks(x, n):
"""
Calculates the number of peaks of at least support n in the time series x. A peak of support n is defined as a
subsequence of x where a value occurs, which is bigger than its n neighbours to the left and to the right.
Hence in the sequence
>>> x = [3, 0, 0, 4, 0, 0, 13]... | def number_peaks(x, n):
"""
Calculates the number of peaks of at least support n in the time series x. A peak of support n is defined as a
subsequence of x where a value occurs, which is bigger than its n neighbours to the left and to the right.
Hence in the sequence
>>> x = [3, 0, 0, 4, 0, 0, 13]... | [
"Calculates",
"the",
"number",
"of",
"peaks",
"of",
"at",
"least",
"support",
"n",
"in",
"the",
"time",
"series",
"x",
".",
"A",
"peak",
"of",
"support",
"n",
"is",
"defined",
"as",
"a",
"subsequence",
"of",
"x",
"where",
"a",
"value",
"occurs",
"which... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1067-L1103 | [
"def",
"number_peaks",
"(",
"x",
",",
"n",
")",
":",
"x_reduced",
"=",
"x",
"[",
"n",
":",
"-",
"n",
"]",
"res",
"=",
"None",
"for",
"i",
"in",
"range",
"(",
"1",
",",
"n",
"+",
"1",
")",
":",
"result_first",
"=",
"(",
"x_reduced",
">",
"_rol... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | index_mass_quantile | Those apply features calculate the relative index i where q% of the mass of the time series x lie left of i.
For example for q = 50% this feature calculator will return the mass center of the time series
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:param param: contains... | tsfresh/feature_extraction/feature_calculators.py | def index_mass_quantile(x, param):
"""
Those apply features calculate the relative index i where q% of the mass of the time series x lie left of i.
For example for q = 50% this feature calculator will return the mass center of the time series
:param x: the time series to calculate the feature of
:t... | def index_mass_quantile(x, param):
"""
Those apply features calculate the relative index i where q% of the mass of the time series x lie left of i.
For example for q = 50% this feature calculator will return the mass center of the time series
:param x: the time series to calculate the feature of
:t... | [
"Those",
"apply",
"features",
"calculate",
"the",
"relative",
"index",
"i",
"where",
"q%",
"of",
"the",
"mass",
"of",
"the",
"time",
"series",
"x",
"lie",
"left",
"of",
"i",
".",
"For",
"example",
"for",
"q",
"=",
"50%",
"this",
"feature",
"calculator",
... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1107-L1131 | [
"def",
"index_mass_quantile",
"(",
"x",
",",
"param",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"abs_x",
"=",
"np",
".",
"abs",
"(",
"x",
")",
"s",
"=",
"sum",
"(",
"abs_x",
")",
"if",
"s",
"==",
"0",
":",
"# all values in x are ze... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | number_cwt_peaks | This feature calculator searches for different peaks in x. To do so, x is smoothed by a ricker wavelet and for
widths ranging from 1 to n. This feature calculator returns the number of peaks that occur at enough width scales
and with sufficiently high Signal-to-Noise-Ratio (SNR)
:param x: the time series t... | tsfresh/feature_extraction/feature_calculators.py | def number_cwt_peaks(x, n):
"""
This feature calculator searches for different peaks in x. To do so, x is smoothed by a ricker wavelet and for
widths ranging from 1 to n. This feature calculator returns the number of peaks that occur at enough width scales
and with sufficiently high Signal-to-Noise-Rati... | def number_cwt_peaks(x, n):
"""
This feature calculator searches for different peaks in x. To do so, x is smoothed by a ricker wavelet and for
widths ranging from 1 to n. This feature calculator returns the number of peaks that occur at enough width scales
and with sufficiently high Signal-to-Noise-Rati... | [
"This",
"feature",
"calculator",
"searches",
"for",
"different",
"peaks",
"in",
"x",
".",
"To",
"do",
"so",
"x",
"is",
"smoothed",
"by",
"a",
"ricker",
"wavelet",
"and",
"for",
"widths",
"ranging",
"from",
"1",
"to",
"n",
".",
"This",
"feature",
"calcula... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1135-L1148 | [
"def",
"number_cwt_peaks",
"(",
"x",
",",
"n",
")",
":",
"return",
"len",
"(",
"find_peaks_cwt",
"(",
"vector",
"=",
"x",
",",
"widths",
"=",
"np",
".",
"array",
"(",
"list",
"(",
"range",
"(",
"1",
",",
"n",
"+",
"1",
")",
")",
")",
",",
"wave... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | linear_trend | Calculate a linear least-squares regression for the values of the time series versus the sequence from 0 to
length of the time series minus one.
This feature assumes the signal to be uniformly sampled. It will not use the time stamps to fit the model.
The parameters control which of the characteristics are ... | tsfresh/feature_extraction/feature_calculators.py | def linear_trend(x, param):
"""
Calculate a linear least-squares regression for the values of the time series versus the sequence from 0 to
length of the time series minus one.
This feature assumes the signal to be uniformly sampled. It will not use the time stamps to fit the model.
The parameters c... | def linear_trend(x, param):
"""
Calculate a linear least-squares regression for the values of the time series versus the sequence from 0 to
length of the time series minus one.
This feature assumes the signal to be uniformly sampled. It will not use the time stamps to fit the model.
The parameters c... | [
"Calculate",
"a",
"linear",
"least",
"-",
"squares",
"regression",
"for",
"the",
"values",
"of",
"the",
"time",
"series",
"versus",
"the",
"sequence",
"from",
"0",
"to",
"length",
"of",
"the",
"time",
"series",
"minus",
"one",
".",
"This",
"feature",
"assu... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1152-L1173 | [
"def",
"linear_trend",
"(",
"x",
",",
"param",
")",
":",
"# todo: we could use the index of the DataFrame here",
"linReg",
"=",
"linregress",
"(",
"range",
"(",
"len",
"(",
"x",
")",
")",
",",
"x",
")",
"return",
"[",
"(",
"\"attr_\\\"{}\\\"\"",
".",
"format",... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | cwt_coefficients | Calculates a Continuous wavelet transform for the Ricker wavelet, also known as the "Mexican hat wavelet" which is
defined by
.. math::
\\frac{2}{\\sqrt{3a} \\pi^{\\frac{1}{4}}} (1 - \\frac{x^2}{a^2}) exp(-\\frac{x^2}{2a^2})
where :math:`a` is the width parameter of the wavelet function.
This... | tsfresh/feature_extraction/feature_calculators.py | def cwt_coefficients(x, param):
"""
Calculates a Continuous wavelet transform for the Ricker wavelet, also known as the "Mexican hat wavelet" which is
defined by
.. math::
\\frac{2}{\\sqrt{3a} \\pi^{\\frac{1}{4}}} (1 - \\frac{x^2}{a^2}) exp(-\\frac{x^2}{2a^2})
where :math:`a` is the width ... | def cwt_coefficients(x, param):
"""
Calculates a Continuous wavelet transform for the Ricker wavelet, also known as the "Mexican hat wavelet" which is
defined by
.. math::
\\frac{2}{\\sqrt{3a} \\pi^{\\frac{1}{4}}} (1 - \\frac{x^2}{a^2}) exp(-\\frac{x^2}{2a^2})
where :math:`a` is the width ... | [
"Calculates",
"a",
"Continuous",
"wavelet",
"transform",
"for",
"the",
"Ricker",
"wavelet",
"also",
"known",
"as",
"the",
"Mexican",
"hat",
"wavelet",
"which",
"is",
"defined",
"by"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1177-L1221 | [
"def",
"cwt_coefficients",
"(",
"x",
",",
"param",
")",
":",
"calculated_cwt",
"=",
"{",
"}",
"res",
"=",
"[",
"]",
"indices",
"=",
"[",
"]",
"for",
"parameter_combination",
"in",
"param",
":",
"widths",
"=",
"parameter_combination",
"[",
"\"widths\"",
"]"... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | spkt_welch_density | This feature calculator estimates the cross power spectral density of the time series x at different frequencies.
To do so, the time series is first shifted from the time domain to the frequency domain.
The feature calculators returns the power spectrum of the different frequencies.
:param x: the time ser... | tsfresh/feature_extraction/feature_calculators.py | def spkt_welch_density(x, param):
"""
This feature calculator estimates the cross power spectral density of the time series x at different frequencies.
To do so, the time series is first shifted from the time domain to the frequency domain.
The feature calculators returns the power spectrum of the diff... | def spkt_welch_density(x, param):
"""
This feature calculator estimates the cross power spectral density of the time series x at different frequencies.
To do so, the time series is first shifted from the time domain to the frequency domain.
The feature calculators returns the power spectrum of the diff... | [
"This",
"feature",
"calculator",
"estimates",
"the",
"cross",
"power",
"spectral",
"density",
"of",
"the",
"time",
"series",
"x",
"at",
"different",
"frequencies",
".",
"To",
"do",
"so",
"the",
"time",
"series",
"is",
"first",
"shifted",
"from",
"the",
"time... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1225-L1254 | [
"def",
"spkt_welch_density",
"(",
"x",
",",
"param",
")",
":",
"freq",
",",
"pxx",
"=",
"welch",
"(",
"x",
",",
"nperseg",
"=",
"min",
"(",
"len",
"(",
"x",
")",
",",
"256",
")",
")",
"coeff",
"=",
"[",
"config",
"[",
"\"coeff\"",
"]",
"for",
"... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | ar_coefficient | This feature calculator fits the unconditional maximum likelihood
of an autoregressive AR(k) process.
The k parameter is the maximum lag of the process
.. math::
X_{t}=\\varphi_0 +\\sum _{{i=1}}^{k}\\varphi_{i}X_{{t-i}}+\\varepsilon_{t}
For the configurations from param which should contain t... | tsfresh/feature_extraction/feature_calculators.py | def ar_coefficient(x, param):
"""
This feature calculator fits the unconditional maximum likelihood
of an autoregressive AR(k) process.
The k parameter is the maximum lag of the process
.. math::
X_{t}=\\varphi_0 +\\sum _{{i=1}}^{k}\\varphi_{i}X_{{t-i}}+\\varepsilon_{t}
For the config... | def ar_coefficient(x, param):
"""
This feature calculator fits the unconditional maximum likelihood
of an autoregressive AR(k) process.
The k parameter is the maximum lag of the process
.. math::
X_{t}=\\varphi_0 +\\sum _{{i=1}}^{k}\\varphi_{i}X_{{t-i}}+\\varepsilon_{t}
For the config... | [
"This",
"feature",
"calculator",
"fits",
"the",
"unconditional",
"maximum",
"likelihood",
"of",
"an",
"autoregressive",
"AR",
"(",
"k",
")",
"process",
".",
"The",
"k",
"parameter",
"is",
"the",
"maximum",
"lag",
"of",
"the",
"process"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1258-L1307 | [
"def",
"ar_coefficient",
"(",
"x",
",",
"param",
")",
":",
"calculated_ar_params",
"=",
"{",
"}",
"x_as_list",
"=",
"list",
"(",
"x",
")",
"calculated_AR",
"=",
"AR",
"(",
"x_as_list",
")",
"res",
"=",
"{",
"}",
"for",
"parameter_combination",
"in",
"par... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | change_quantiles | First fixes a corridor given by the quantiles ql and qh of the distribution of x.
Then calculates the average, absolute value of consecutive changes of the series x inside this corridor.
Think about selecting a corridor on the
y-Axis and only calculating the mean of the absolute change of the time series i... | tsfresh/feature_extraction/feature_calculators.py | def change_quantiles(x, ql, qh, isabs, f_agg):
"""
First fixes a corridor given by the quantiles ql and qh of the distribution of x.
Then calculates the average, absolute value of consecutive changes of the series x inside this corridor.
Think about selecting a corridor on the
y-Axis and only calcu... | def change_quantiles(x, ql, qh, isabs, f_agg):
"""
First fixes a corridor given by the quantiles ql and qh of the distribution of x.
Then calculates the average, absolute value of consecutive changes of the series x inside this corridor.
Think about selecting a corridor on the
y-Axis and only calcu... | [
"First",
"fixes",
"a",
"corridor",
"given",
"by",
"the",
"quantiles",
"ql",
"and",
"qh",
"of",
"the",
"distribution",
"of",
"x",
".",
"Then",
"calculates",
"the",
"average",
"absolute",
"value",
"of",
"consecutive",
"changes",
"of",
"the",
"series",
"x",
"... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1311-L1353 | [
"def",
"change_quantiles",
"(",
"x",
",",
"ql",
",",
"qh",
",",
"isabs",
",",
"f_agg",
")",
":",
"if",
"ql",
">=",
"qh",
":",
"ValueError",
"(",
"\"ql={} should be lower than qh={}\"",
".",
"format",
"(",
"ql",
",",
"qh",
")",
")",
"div",
"=",
"np",
... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | time_reversal_asymmetry_statistic | This function calculates the value of
.. math::
\\frac{1}{n-2lag} \sum_{i=0}^{n-2lag} x_{i + 2 \cdot lag}^2 \cdot x_{i + lag} - x_{i + lag} \cdot x_{i}^2
which is
.. math::
\\mathbb{E}[L^2(X)^2 \cdot L(X) - L(X) \cdot X^2]
where :math:`\\mathbb{E}` is the mean and :math:`L` is the... | tsfresh/feature_extraction/feature_calculators.py | def time_reversal_asymmetry_statistic(x, lag):
"""
This function calculates the value of
.. math::
\\frac{1}{n-2lag} \sum_{i=0}^{n-2lag} x_{i + 2 \cdot lag}^2 \cdot x_{i + lag} - x_{i + lag} \cdot x_{i}^2
which is
.. math::
\\mathbb{E}[L^2(X)^2 \cdot L(X) - L(X) \cdot X^2]
... | def time_reversal_asymmetry_statistic(x, lag):
"""
This function calculates the value of
.. math::
\\frac{1}{n-2lag} \sum_{i=0}^{n-2lag} x_{i + 2 \cdot lag}^2 \cdot x_{i + lag} - x_{i + lag} \cdot x_{i}^2
which is
.. math::
\\mathbb{E}[L^2(X)^2 \cdot L(X) - L(X) \cdot X^2]
... | [
"This",
"function",
"calculates",
"the",
"value",
"of"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1358-L1395 | [
"def",
"time_reversal_asymmetry_statistic",
"(",
"x",
",",
"lag",
")",
":",
"n",
"=",
"len",
"(",
"x",
")",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"if",
"2",
"*",
"lag",
">=",
"n",
":",
"return",
"0",
"else",
":",
"one_lag",
"=",
"_roll",... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | c3 | This function calculates the value of
.. math::
\\frac{1}{n-2lag} \sum_{i=0}^{n-2lag} x_{i + 2 \cdot lag}^2 \cdot x_{i + lag} \cdot x_{i}
which is
.. math::
\\mathbb{E}[L^2(X)^2 \cdot L(X) \cdot X]
where :math:`\\mathbb{E}` is the mean and :math:`L` is the lag operator. It was prop... | tsfresh/feature_extraction/feature_calculators.py | def c3(x, lag):
"""
This function calculates the value of
.. math::
\\frac{1}{n-2lag} \sum_{i=0}^{n-2lag} x_{i + 2 \cdot lag}^2 \cdot x_{i + lag} \cdot x_{i}
which is
.. math::
\\mathbb{E}[L^2(X)^2 \cdot L(X) \cdot X]
where :math:`\\mathbb{E}` is the mean and :math:`L` is t... | def c3(x, lag):
"""
This function calculates the value of
.. math::
\\frac{1}{n-2lag} \sum_{i=0}^{n-2lag} x_{i + 2 \cdot lag}^2 \cdot x_{i + lag} \cdot x_{i}
which is
.. math::
\\mathbb{E}[L^2(X)^2 \cdot L(X) \cdot X]
where :math:`\\mathbb{E}` is the mean and :math:`L` is t... | [
"This",
"function",
"calculates",
"the",
"value",
"of"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1399-L1435 | [
"def",
"c3",
"(",
"x",
",",
"lag",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"n",
"=",
"x",
".",
"size",
"if",
"2... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | binned_entropy | First bins the values of x into max_bins equidistant bins.
Then calculates the value of
.. math::
- \\sum_{k=0}^{min(max\\_bins, len(x))} p_k log(p_k) \\cdot \\mathbf{1}_{(p_k > 0)}
where :math:`p_k` is the percentage of samples in bin :math:`k`.
:param x: the time series to calculate the fe... | tsfresh/feature_extraction/feature_calculators.py | def binned_entropy(x, max_bins):
"""
First bins the values of x into max_bins equidistant bins.
Then calculates the value of
.. math::
- \\sum_{k=0}^{min(max\\_bins, len(x))} p_k log(p_k) \\cdot \\mathbf{1}_{(p_k > 0)}
where :math:`p_k` is the percentage of samples in bin :math:`k`.
... | def binned_entropy(x, max_bins):
"""
First bins the values of x into max_bins equidistant bins.
Then calculates the value of
.. math::
- \\sum_{k=0}^{min(max\\_bins, len(x))} p_k log(p_k) \\cdot \\mathbf{1}_{(p_k > 0)}
where :math:`p_k` is the percentage of samples in bin :math:`k`.
... | [
"First",
"bins",
"the",
"values",
"of",
"x",
"into",
"max_bins",
"equidistant",
"bins",
".",
"Then",
"calculates",
"the",
"value",
"of"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1439-L1461 | [
"def",
"binned_entropy",
"(",
"x",
",",
"max_bins",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"hist",
",",
"bin_edges",
... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | sample_entropy | Calculate and return sample entropy of x.
.. rubric:: References
| [1] http://en.wikipedia.org/wiki/Sample_Entropy
| [2] https://www.ncbi.nlm.nih.gov/pubmed/10843903?dopt=Abstract
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:return: the value of this featur... | tsfresh/feature_extraction/feature_calculators.py | def sample_entropy(x):
"""
Calculate and return sample entropy of x.
.. rubric:: References
| [1] http://en.wikipedia.org/wiki/Sample_Entropy
| [2] https://www.ncbi.nlm.nih.gov/pubmed/10843903?dopt=Abstract
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
... | def sample_entropy(x):
"""
Calculate and return sample entropy of x.
.. rubric:: References
| [1] http://en.wikipedia.org/wiki/Sample_Entropy
| [2] https://www.ncbi.nlm.nih.gov/pubmed/10843903?dopt=Abstract
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
... | [
"Calculate",
"and",
"return",
"sample",
"entropy",
"of",
"x",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1467-L1517 | [
"def",
"sample_entropy",
"(",
"x",
")",
":",
"x",
"=",
"np",
".",
"array",
"(",
"x",
")",
"sample_length",
"=",
"1",
"# number of sequential points of the time series",
"tolerance",
"=",
"0.2",
"*",
"np",
".",
"std",
"(",
"x",
")",
"# 0.2 is a common value for... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | autocorrelation | Calculates the autocorrelation of the specified lag, according to the formula [1]
.. math::
\\frac{1}{(n-l)\sigma^{2}} \\sum_{t=1}^{n-l}(X_{t}-\\mu )(X_{t+l}-\\mu)
where :math:`n` is the length of the time series :math:`X_i`, :math:`\sigma^2` its variance and :math:`\mu` its
mean. `l` denotes the... | tsfresh/feature_extraction/feature_calculators.py | def autocorrelation(x, lag):
"""
Calculates the autocorrelation of the specified lag, according to the formula [1]
.. math::
\\frac{1}{(n-l)\sigma^{2}} \\sum_{t=1}^{n-l}(X_{t}-\\mu )(X_{t+l}-\\mu)
where :math:`n` is the length of the time series :math:`X_i`, :math:`\sigma^2` its variance and ... | def autocorrelation(x, lag):
"""
Calculates the autocorrelation of the specified lag, according to the formula [1]
.. math::
\\frac{1}{(n-l)\sigma^{2}} \\sum_{t=1}^{n-l}(X_{t}-\\mu )(X_{t+l}-\\mu)
where :math:`n` is the length of the time series :math:`X_i`, :math:`\sigma^2` its variance and ... | [
"Calculates",
"the",
"autocorrelation",
"of",
"the",
"specified",
"lag",
"according",
"to",
"the",
"formula",
"[",
"1",
"]"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1521-L1561 | [
"def",
"autocorrelation",
"(",
"x",
",",
"lag",
")",
":",
"# This is important: If a series is passed, the product below is calculated",
"# based on the index, which corresponds to squaring the series.",
"if",
"type",
"(",
"x",
")",
"is",
"pd",
".",
"Series",
":",
"x",
"=",... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | quantile | Calculates the q quantile of x. This is the value of x greater than q% of the ordered values from x.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:param q: the quantile to calculate
:type q: float
:return: the value of this feature
:return type: float | tsfresh/feature_extraction/feature_calculators.py | def quantile(x, q):
"""
Calculates the q quantile of x. This is the value of x greater than q% of the ordered values from x.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:param q: the quantile to calculate
:type q: float
:return: the value of this feature
... | def quantile(x, q):
"""
Calculates the q quantile of x. This is the value of x greater than q% of the ordered values from x.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:param q: the quantile to calculate
:type q: float
:return: the value of this feature
... | [
"Calculates",
"the",
"q",
"quantile",
"of",
"x",
".",
"This",
"is",
"the",
"value",
"of",
"x",
"greater",
"than",
"q%",
"of",
"the",
"ordered",
"values",
"from",
"x",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1565-L1577 | [
"def",
"quantile",
"(",
"x",
",",
"q",
")",
":",
"x",
"=",
"pd",
".",
"Series",
"(",
"x",
")",
"return",
"pd",
".",
"Series",
".",
"quantile",
"(",
"x",
",",
"q",
")"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | number_crossing_m | Calculates the number of crossings of x on m. A crossing is defined as two sequential values where the first value
is lower than m and the next is greater, or vice-versa. If you set m to zero, you will get the number of zero
crossings.
:param x: the time series to calculate the feature of
:type x: nump... | tsfresh/feature_extraction/feature_calculators.py | def number_crossing_m(x, m):
"""
Calculates the number of crossings of x on m. A crossing is defined as two sequential values where the first value
is lower than m and the next is greater, or vice-versa. If you set m to zero, you will get the number of zero
crossings.
:param x: the time series to c... | def number_crossing_m(x, m):
"""
Calculates the number of crossings of x on m. A crossing is defined as two sequential values where the first value
is lower than m and the next is greater, or vice-versa. If you set m to zero, you will get the number of zero
crossings.
:param x: the time series to c... | [
"Calculates",
"the",
"number",
"of",
"crossings",
"of",
"x",
"on",
"m",
".",
"A",
"crossing",
"is",
"defined",
"as",
"two",
"sequential",
"values",
"where",
"the",
"first",
"value",
"is",
"lower",
"than",
"m",
"and",
"the",
"next",
"is",
"greater",
"or",... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1581-L1598 | [
"def",
"number_crossing_m",
"(",
"x",
",",
"m",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"# From https://stackoverflow.com/q... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | value_count | Count occurrences of `value` in time series x.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:param value: the value to be counted
:type value: int or float
:return: the count
:rtype: int | tsfresh/feature_extraction/feature_calculators.py | def value_count(x, value):
"""
Count occurrences of `value` in time series x.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:param value: the value to be counted
:type value: int or float
:return: the count
:rtype: int
"""
if not isinstance(x, (np.... | def value_count(x, value):
"""
Count occurrences of `value` in time series x.
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:param value: the value to be counted
:type value: int or float
:return: the count
:rtype: int
"""
if not isinstance(x, (np.... | [
"Count",
"occurrences",
"of",
"value",
"in",
"time",
"series",
"x",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1630-L1647 | [
"def",
"value_count",
"(",
"x",
",",
"value",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"if",
"np",
".",
"isnan",
"("... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | range_count | Count observed values within the interval [min, max).
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:param min: the inclusive lower bound of the range
:type min: int or float
:param max: the exclusive upper bound of the range
:type max: int or float
:return: t... | tsfresh/feature_extraction/feature_calculators.py | def range_count(x, min, max):
"""
Count observed values within the interval [min, max).
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:param min: the inclusive lower bound of the range
:type min: int or float
:param max: the exclusive upper bound of the range
... | def range_count(x, min, max):
"""
Count observed values within the interval [min, max).
:param x: the time series to calculate the feature of
:type x: numpy.ndarray
:param min: the inclusive lower bound of the range
:type min: int or float
:param max: the exclusive upper bound of the range
... | [
"Count",
"observed",
"values",
"within",
"the",
"interval",
"[",
"min",
"max",
")",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1651-L1664 | [
"def",
"range_count",
"(",
"x",
",",
"min",
",",
"max",
")",
":",
"return",
"np",
".",
"sum",
"(",
"(",
"x",
">=",
"min",
")",
"&",
"(",
"x",
"<",
"max",
")",
")"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | approximate_entropy | Implements a vectorized Approximate entropy algorithm.
https://en.wikipedia.org/wiki/Approximate_entropy
For short time-series this method is highly dependent on the parameters,
but should be stable for N > 2000, see:
Yentes et al. (2012) -
*The Appropriate Use of Approximate Entropy ... | tsfresh/feature_extraction/feature_calculators.py | def approximate_entropy(x, m, r):
"""
Implements a vectorized Approximate entropy algorithm.
https://en.wikipedia.org/wiki/Approximate_entropy
For short time-series this method is highly dependent on the parameters,
but should be stable for N > 2000, see:
Yentes et al. (2012) -
... | def approximate_entropy(x, m, r):
"""
Implements a vectorized Approximate entropy algorithm.
https://en.wikipedia.org/wiki/Approximate_entropy
For short time-series this method is highly dependent on the parameters,
but should be stable for N > 2000, see:
Yentes et al. (2012) -
... | [
"Implements",
"a",
"vectorized",
"Approximate",
"entropy",
"algorithm",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1669-L1713 | [
"def",
"approximate_entropy",
"(",
"x",
",",
"m",
",",
"r",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"N",
"=",
"x",
... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | friedrich_coefficients | Coefficients of polynomial :math:`h(x)`, which has been fitted to
the deterministic dynamics of Langevin model
.. math::
\dot{x}(t) = h(x(t)) + \mathcal{N}(0,R)
as described by [1].
For short time-series this method is highly dependent on the parameters.
.. rubric:: References
| [1... | tsfresh/feature_extraction/feature_calculators.py | def friedrich_coefficients(x, param):
"""
Coefficients of polynomial :math:`h(x)`, which has been fitted to
the deterministic dynamics of Langevin model
.. math::
\dot{x}(t) = h(x(t)) + \mathcal{N}(0,R)
as described by [1].
For short time-series this method is highly dependent on the ... | def friedrich_coefficients(x, param):
"""
Coefficients of polynomial :math:`h(x)`, which has been fitted to
the deterministic dynamics of Langevin model
.. math::
\dot{x}(t) = h(x(t)) + \mathcal{N}(0,R)
as described by [1].
For short time-series this method is highly dependent on the ... | [
"Coefficients",
"of",
"polynomial",
":",
"math",
":",
"h",
"(",
"x",
")",
"which",
"has",
"been",
"fitted",
"to",
"the",
"deterministic",
"dynamics",
"of",
"Langevin",
"model"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1717-L1764 | [
"def",
"friedrich_coefficients",
"(",
"x",
",",
"param",
")",
":",
"calculated",
"=",
"{",
"}",
"# calculated is dictionary storing the calculated coefficients {m: {r: friedrich_coefficients}}",
"res",
"=",
"{",
"}",
"# res is a dictionary containg the results {\"m_10__r_2__coeff_3... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | max_langevin_fixed_point | Largest fixed point of dynamics :math:argmax_x {h(x)=0}` estimated from polynomial :math:`h(x)`,
which has been fitted to the deterministic dynamics of Langevin model
.. math::
\dot(x)(t) = h(x(t)) + R \mathcal(N)(0,1)
as described by
Friedrich et al. (2000): Physics Letters A 271, p. 21... | tsfresh/feature_extraction/feature_calculators.py | def max_langevin_fixed_point(x, r, m):
"""
Largest fixed point of dynamics :math:argmax_x {h(x)=0}` estimated from polynomial :math:`h(x)`,
which has been fitted to the deterministic dynamics of Langevin model
.. math::
\dot(x)(t) = h(x(t)) + R \mathcal(N)(0,1)
as described by
Fr... | def max_langevin_fixed_point(x, r, m):
"""
Largest fixed point of dynamics :math:argmax_x {h(x)=0}` estimated from polynomial :math:`h(x)`,
which has been fitted to the deterministic dynamics of Langevin model
.. math::
\dot(x)(t) = h(x(t)) + R \mathcal(N)(0,1)
as described by
Fr... | [
"Largest",
"fixed",
"point",
"of",
"dynamics",
":",
"math",
":",
"argmax_x",
"{",
"h",
"(",
"x",
")",
"=",
"0",
"}",
"estimated",
"from",
"polynomial",
":",
"math",
":",
"h",
"(",
"x",
")",
"which",
"has",
"been",
"fitted",
"to",
"the",
"deterministi... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1768-L1801 | [
"def",
"max_langevin_fixed_point",
"(",
"x",
",",
"r",
",",
"m",
")",
":",
"coeff",
"=",
"_estimate_friedrich_coefficients",
"(",
"x",
",",
"m",
",",
"r",
")",
"try",
":",
"max_fixed_point",
"=",
"np",
".",
"max",
"(",
"np",
".",
"real",
"(",
"np",
"... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | agg_linear_trend | Calculates a linear least-squares regression for values of the time series that were aggregated over chunks versus
the sequence from 0 up to the number of chunks minus one.
This feature assumes the signal to be uniformly sampled. It will not use the time stamps to fit the model.
The parameters attr contro... | tsfresh/feature_extraction/feature_calculators.py | def agg_linear_trend(x, param):
"""
Calculates a linear least-squares regression for values of the time series that were aggregated over chunks versus
the sequence from 0 up to the number of chunks minus one.
This feature assumes the signal to be uniformly sampled. It will not use the time stamps to fi... | def agg_linear_trend(x, param):
"""
Calculates a linear least-squares regression for values of the time series that were aggregated over chunks versus
the sequence from 0 up to the number of chunks minus one.
This feature assumes the signal to be uniformly sampled. It will not use the time stamps to fi... | [
"Calculates",
"a",
"linear",
"least",
"-",
"squares",
"regression",
"for",
"values",
"of",
"the",
"time",
"series",
"that",
"were",
"aggregated",
"over",
"chunks",
"versus",
"the",
"sequence",
"from",
"0",
"up",
"to",
"the",
"number",
"of",
"chunks",
"minus"... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1805-L1854 | [
"def",
"agg_linear_trend",
"(",
"x",
",",
"param",
")",
":",
"# todo: we could use the index of the DataFrame here",
"calculated_agg",
"=",
"{",
"}",
"res_data",
"=",
"[",
"]",
"res_index",
"=",
"[",
"]",
"for",
"parameter_combination",
"in",
"param",
":",
"chunk_... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | energy_ratio_by_chunks | Calculates the sum of squares of chunk i out of N chunks expressed as a ratio with the sum of squares over the whole
series.
Takes as input parameters the number num_segments of segments to divide the series into and segment_focus
which is the segment number (starting at zero) to return a feature on.
... | tsfresh/feature_extraction/feature_calculators.py | def energy_ratio_by_chunks(x, param):
"""
Calculates the sum of squares of chunk i out of N chunks expressed as a ratio with the sum of squares over the whole
series.
Takes as input parameters the number num_segments of segments to divide the series into and segment_focus
which is the segment numbe... | def energy_ratio_by_chunks(x, param):
"""
Calculates the sum of squares of chunk i out of N chunks expressed as a ratio with the sum of squares over the whole
series.
Takes as input parameters the number num_segments of segments to divide the series into and segment_focus
which is the segment numbe... | [
"Calculates",
"the",
"sum",
"of",
"squares",
"of",
"chunk",
"i",
"out",
"of",
"N",
"chunks",
"expressed",
"as",
"a",
"ratio",
"with",
"the",
"sum",
"of",
"squares",
"over",
"the",
"whole",
"series",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1858-L1892 | [
"def",
"energy_ratio_by_chunks",
"(",
"x",
",",
"param",
")",
":",
"res_data",
"=",
"[",
"]",
"res_index",
"=",
"[",
"]",
"full_series_energy",
"=",
"np",
".",
"sum",
"(",
"x",
"**",
"2",
")",
"for",
"parameter_combination",
"in",
"param",
":",
"num_segm... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | linear_trend_timewise | Calculate a linear least-squares regression for the values of the time series versus the sequence from 0 to
length of the time series minus one.
This feature uses the index of the time series to fit the model, which must be of a datetime
dtype.
The parameters control which of the characteristics are ret... | tsfresh/feature_extraction/feature_calculators.py | def linear_trend_timewise(x, param):
"""
Calculate a linear least-squares regression for the values of the time series versus the sequence from 0 to
length of the time series minus one.
This feature uses the index of the time series to fit the model, which must be of a datetime
dtype.
The parame... | def linear_trend_timewise(x, param):
"""
Calculate a linear least-squares regression for the values of the time series versus the sequence from 0 to
length of the time series minus one.
This feature uses the index of the time series to fit the model, which must be of a datetime
dtype.
The parame... | [
"Calculate",
"a",
"linear",
"least",
"-",
"squares",
"regression",
"for",
"the",
"values",
"of",
"the",
"time",
"series",
"versus",
"the",
"sequence",
"from",
"0",
"to",
"length",
"of",
"the",
"time",
"series",
"minus",
"one",
".",
"This",
"feature",
"uses... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1899-L1927 | [
"def",
"linear_trend_timewise",
"(",
"x",
",",
"param",
")",
":",
"ix",
"=",
"x",
".",
"index",
"# Get differences between each timestamp and the first timestamp in seconds.",
"# Then convert to hours and reshape for linear regression",
"times_seconds",
"=",
"(",
"ix",
"-",
"... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | FeatureSelector.fit | Extract the information, which of the features are relevent using the given target.
For more information, please see the :func:`~tsfresh.festure_selection.festure_selector.check_fs_sig_bh`
function. All columns in the input data sample are treated as feature. The index of all
rows in X must be ... | tsfresh/transformers/feature_selector.py | def fit(self, X, y):
"""
Extract the information, which of the features are relevent using the given target.
For more information, please see the :func:`~tsfresh.festure_selection.festure_selector.check_fs_sig_bh`
function. All columns in the input data sample are treated as feature. Th... | def fit(self, X, y):
"""
Extract the information, which of the features are relevent using the given target.
For more information, please see the :func:`~tsfresh.festure_selection.festure_selector.check_fs_sig_bh`
function. All columns in the input data sample are treated as feature. Th... | [
"Extract",
"the",
"information",
"which",
"of",
"the",
"features",
"are",
"relevent",
"using",
"the",
"given",
"target",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/transformers/feature_selector.py#L118-L151 | [
"def",
"fit",
"(",
"self",
",",
"X",
",",
"y",
")",
":",
"if",
"not",
"isinstance",
"(",
"X",
",",
"pd",
".",
"DataFrame",
")",
":",
"X",
"=",
"pd",
".",
"DataFrame",
"(",
"X",
".",
"copy",
"(",
")",
")",
"if",
"not",
"isinstance",
"(",
"y",
... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | FeatureSelector.transform | Delete all features, which were not relevant in the fit phase.
:param X: data sample with all features, which will be reduced to only those that are relevant
:type X: pandas.DataSeries or numpy.array
:return: same data sample as X, but with only the relevant features
:rtype: pandas.Dat... | tsfresh/transformers/feature_selector.py | def transform(self, X):
"""
Delete all features, which were not relevant in the fit phase.
:param X: data sample with all features, which will be reduced to only those that are relevant
:type X: pandas.DataSeries or numpy.array
:return: same data sample as X, but with only the ... | def transform(self, X):
"""
Delete all features, which were not relevant in the fit phase.
:param X: data sample with all features, which will be reduced to only those that are relevant
:type X: pandas.DataSeries or numpy.array
:return: same data sample as X, but with only the ... | [
"Delete",
"all",
"features",
"which",
"were",
"not",
"relevant",
"in",
"the",
"fit",
"phase",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/transformers/feature_selector.py#L153-L169 | [
"def",
"transform",
"(",
"self",
",",
"X",
")",
":",
"if",
"self",
".",
"relevant_features",
"is",
"None",
":",
"raise",
"RuntimeError",
"(",
"\"You have to call fit before.\"",
")",
"if",
"isinstance",
"(",
"X",
",",
"pd",
".",
"DataFrame",
")",
":",
"ret... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | download_har_dataset | Download human activity recognition dataset from UCI ML Repository and store it at /tsfresh/notebooks/data.
Examples
========
>>> from tsfresh.examples import har_dataset
>>> har_dataset.download_har_dataset() | tsfresh/examples/har_dataset.py | def download_har_dataset():
"""
Download human activity recognition dataset from UCI ML Repository and store it at /tsfresh/notebooks/data.
Examples
========
>>> from tsfresh.examples import har_dataset
>>> har_dataset.download_har_dataset()
"""
zipurl = 'https://github.com/MaxBen... | def download_har_dataset():
"""
Download human activity recognition dataset from UCI ML Repository and store it at /tsfresh/notebooks/data.
Examples
========
>>> from tsfresh.examples import har_dataset
>>> har_dataset.download_har_dataset()
"""
zipurl = 'https://github.com/MaxBen... | [
"Download",
"human",
"activity",
"recognition",
"dataset",
"from",
"UCI",
"ML",
"Repository",
"and",
"store",
"it",
"at",
"/",
"tsfresh",
"/",
"notebooks",
"/",
"data",
".",
"Examples",
"========"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/examples/har_dataset.py#L38-L58 | [
"def",
"download_har_dataset",
"(",
")",
":",
"zipurl",
"=",
"'https://github.com/MaxBenChrist/human-activity-dataset/blob/master/UCI%20HAR%20Dataset.zip?raw=true'",
"if",
"os",
".",
"path",
".",
"exists",
"(",
"data_file_name_dataset",
")",
"and",
"os",
".",
"path",
".",
... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | FeatureAugmenter.transform | Add the features calculated using the timeseries_container and add them to the corresponding rows in the input
pandas.DataFrame X.
To save some computing time, you should only include those time serieses in the container, that you
need. You can set the timeseries container with the method :func... | tsfresh/transformers/feature_augmenter.py | def transform(self, X):
"""
Add the features calculated using the timeseries_container and add them to the corresponding rows in the input
pandas.DataFrame X.
To save some computing time, you should only include those time serieses in the container, that you
need. You can set th... | def transform(self, X):
"""
Add the features calculated using the timeseries_container and add them to the corresponding rows in the input
pandas.DataFrame X.
To save some computing time, you should only include those time serieses in the container, that you
need. You can set th... | [
"Add",
"the",
"features",
"calculated",
"using",
"the",
"timeseries_container",
"and",
"add",
"them",
"to",
"the",
"corresponding",
"rows",
"in",
"the",
"input",
"pandas",
".",
"DataFrame",
"X",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/transformers/feature_augmenter.py#L166-L202 | [
"def",
"transform",
"(",
"self",
",",
"X",
")",
":",
"if",
"self",
".",
"timeseries_container",
"is",
"None",
":",
"raise",
"RuntimeError",
"(",
"\"You have to provide a time series using the set_timeseries_container function before.\"",
")",
"# Extract only features for the ... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | RelevantFeatureAugmenter.fit | Use the given timeseries from :func:`~set_timeseries_container` and calculate features from it and add them
to the data sample X (which can contain other manually-designed features).
Then determine which of the features of X are relevant for the given target y.
Store those relevant features int... | tsfresh/transformers/relevant_feature_augmenter.py | def fit(self, X, y):
"""
Use the given timeseries from :func:`~set_timeseries_container` and calculate features from it and add them
to the data sample X (which can contain other manually-designed features).
Then determine which of the features of X are relevant for the given target y.
... | def fit(self, X, y):
"""
Use the given timeseries from :func:`~set_timeseries_container` and calculate features from it and add them
to the data sample X (which can contain other manually-designed features).
Then determine which of the features of X are relevant for the given target y.
... | [
"Use",
"the",
"given",
"timeseries",
"from",
":",
"func",
":",
"~set_timeseries_container",
"and",
"calculate",
"features",
"from",
"it",
"and",
"add",
"them",
"to",
"the",
"data",
"sample",
"X",
"(",
"which",
"can",
"contain",
"other",
"manually",
"-",
"des... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/transformers/relevant_feature_augmenter.py#L228-L268 | [
"def",
"fit",
"(",
"self",
",",
"X",
",",
"y",
")",
":",
"if",
"self",
".",
"timeseries_container",
"is",
"None",
":",
"raise",
"RuntimeError",
"(",
"\"You have to provide a time series using the set_timeseries_container function before.\"",
")",
"self",
".",
"feature... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | RelevantFeatureAugmenter.transform | After the fit step, it is known which features are relevant, Only extract those from the time series handed in
with the function :func:`~set_timeseries_container`.
If filter_only_tsfresh_features is False, also delete the irrelevant, already present features in the data frame.
:param X: the da... | tsfresh/transformers/relevant_feature_augmenter.py | def transform(self, X):
"""
After the fit step, it is known which features are relevant, Only extract those from the time series handed in
with the function :func:`~set_timeseries_container`.
If filter_only_tsfresh_features is False, also delete the irrelevant, already present features ... | def transform(self, X):
"""
After the fit step, it is known which features are relevant, Only extract those from the time series handed in
with the function :func:`~set_timeseries_container`.
If filter_only_tsfresh_features is False, also delete the irrelevant, already present features ... | [
"After",
"the",
"fit",
"step",
"it",
"is",
"known",
"which",
"features",
"are",
"relevant",
"Only",
"extract",
"those",
"from",
"the",
"time",
"series",
"handed",
"in",
"with",
"the",
"function",
":",
"func",
":",
"~set_timeseries_container",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/transformers/relevant_feature_augmenter.py#L270-L321 | [
"def",
"transform",
"(",
"self",
",",
"X",
")",
":",
"if",
"self",
".",
"feature_selector",
".",
"relevant_features",
"is",
"None",
":",
"raise",
"RuntimeError",
"(",
"\"You have to call fit before.\"",
")",
"if",
"self",
".",
"timeseries_container",
"is",
"None... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | _preprocess | given a DataFrame where records are stored row-wise, rearrange it
such that records are stored column-wise. | tsfresh/scripts/run_tsfresh.py | def _preprocess(df):
"""
given a DataFrame where records are stored row-wise, rearrange it
such that records are stored column-wise.
"""
df = df.stack()
df.index.rename(["id", "time"], inplace=True) # .reset_index()
df.name = "value"
df = df.reset_index()
return df | def _preprocess(df):
"""
given a DataFrame where records are stored row-wise, rearrange it
such that records are stored column-wise.
"""
df = df.stack()
df.index.rename(["id", "time"], inplace=True) # .reset_index()
df.name = "value"
df = df.reset_index()
return df | [
"given",
"a",
"DataFrame",
"where",
"records",
"are",
"stored",
"row",
"-",
"wise",
"rearrange",
"it",
"such",
"that",
"records",
"are",
"stored",
"column",
"-",
"wise",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/scripts/run_tsfresh.py#L30-L42 | [
"def",
"_preprocess",
"(",
"df",
")",
":",
"df",
"=",
"df",
".",
"stack",
"(",
")",
"df",
".",
"index",
".",
"rename",
"(",
"[",
"\"id\"",
",",
"\"time\"",
"]",
",",
"inplace",
"=",
"True",
")",
"# .reset_index()",
"df",
".",
"name",
"=",
"\"value\... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | calculate_relevance_table | Calculate the relevance table for the features contained in feature matrix `X` with respect to target vector `y`.
The relevance table is calculated for the intended machine learning task `ml_task`.
To accomplish this for each feature from the input pandas.DataFrame an univariate feature significance test
i... | tsfresh/feature_selection/relevance.py | def calculate_relevance_table(X, y, ml_task='auto', n_jobs=defaults.N_PROCESSES, chunksize=defaults.CHUNKSIZE,
test_for_binary_target_binary_feature=defaults.TEST_FOR_BINARY_TARGET_BINARY_FEATURE,
test_for_binary_target_real_feature=defaults.TEST_FOR_BINARY_TARGET_REAL_FEATURE,
... | def calculate_relevance_table(X, y, ml_task='auto', n_jobs=defaults.N_PROCESSES, chunksize=defaults.CHUNKSIZE,
test_for_binary_target_binary_feature=defaults.TEST_FOR_BINARY_TARGET_BINARY_FEATURE,
test_for_binary_target_real_feature=defaults.TEST_FOR_BINARY_TARGET_REAL_FEATURE,
... | [
"Calculate",
"the",
"relevance",
"table",
"for",
"the",
"features",
"contained",
"in",
"feature",
"matrix",
"X",
"with",
"respect",
"to",
"target",
"vector",
"y",
".",
"The",
"relevance",
"table",
"is",
"calculated",
"for",
"the",
"intended",
"machine",
"learn... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_selection/relevance.py#L31-L191 | [
"def",
"calculate_relevance_table",
"(",
"X",
",",
"y",
",",
"ml_task",
"=",
"'auto'",
",",
"n_jobs",
"=",
"defaults",
".",
"N_PROCESSES",
",",
"chunksize",
"=",
"defaults",
".",
"CHUNKSIZE",
",",
"test_for_binary_target_binary_feature",
"=",
"defaults",
".",
"T... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | infer_ml_task | Infer the machine learning task to select for.
The result will be either `'regression'` or `'classification'`.
If the target vector only consists of integer typed values or objects, we assume the task is `'classification'`.
Else `'regression'`.
:param y: The target vector y.
:type y: pandas.Series
... | tsfresh/feature_selection/relevance.py | def infer_ml_task(y):
"""
Infer the machine learning task to select for.
The result will be either `'regression'` or `'classification'`.
If the target vector only consists of integer typed values or objects, we assume the task is `'classification'`.
Else `'regression'`.
:param y: The target vec... | def infer_ml_task(y):
"""
Infer the machine learning task to select for.
The result will be either `'regression'` or `'classification'`.
If the target vector only consists of integer typed values or objects, we assume the task is `'classification'`.
Else `'regression'`.
:param y: The target vec... | [
"Infer",
"the",
"machine",
"learning",
"task",
"to",
"select",
"for",
".",
"The",
"result",
"will",
"be",
"either",
"regression",
"or",
"classification",
".",
"If",
"the",
"target",
"vector",
"only",
"consists",
"of",
"integer",
"typed",
"values",
"or",
"obj... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_selection/relevance.py#L208-L226 | [
"def",
"infer_ml_task",
"(",
"y",
")",
":",
"if",
"y",
".",
"dtype",
".",
"kind",
"in",
"np",
".",
"typecodes",
"[",
"'AllInteger'",
"]",
"or",
"y",
".",
"dtype",
"==",
"np",
".",
"object",
":",
"ml_task",
"=",
"'classification'",
"else",
":",
"ml_ta... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | combine_relevance_tables | Create a combined relevance table out of a list of relevance tables,
aggregating the p-values and the relevances.
:param relevance_tables: A list of relevance tables
:type relevance_tables: List[pd.DataFrame]
:return: The combined relevance table
:rtype: pandas.DataFrame | tsfresh/feature_selection/relevance.py | def combine_relevance_tables(relevance_tables):
"""
Create a combined relevance table out of a list of relevance tables,
aggregating the p-values and the relevances.
:param relevance_tables: A list of relevance tables
:type relevance_tables: List[pd.DataFrame]
:return: The combined relevance ta... | def combine_relevance_tables(relevance_tables):
"""
Create a combined relevance table out of a list of relevance tables,
aggregating the p-values and the relevances.
:param relevance_tables: A list of relevance tables
:type relevance_tables: List[pd.DataFrame]
:return: The combined relevance ta... | [
"Create",
"a",
"combined",
"relevance",
"table",
"out",
"of",
"a",
"list",
"of",
"relevance",
"tables",
"aggregating",
"the",
"p",
"-",
"values",
"and",
"the",
"relevances",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_selection/relevance.py#L229-L244 | [
"def",
"combine_relevance_tables",
"(",
"relevance_tables",
")",
":",
"def",
"_combine",
"(",
"a",
",",
"b",
")",
":",
"a",
".",
"relevant",
"|=",
"b",
".",
"relevant",
"a",
".",
"p_value",
"=",
"a",
".",
"p_value",
".",
"combine",
"(",
"b",
".",
"p_... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | get_feature_type | For a given feature, determine if it is real, binary or constant.
Here binary means that only two unique values occur in the feature.
:param feature_column: The feature column
:type feature_column: pandas.Series
:return: 'constant', 'binary' or 'real' | tsfresh/feature_selection/relevance.py | def get_feature_type(feature_column):
"""
For a given feature, determine if it is real, binary or constant.
Here binary means that only two unique values occur in the feature.
:param feature_column: The feature column
:type feature_column: pandas.Series
:return: 'constant', 'binary' or 'real'
... | def get_feature_type(feature_column):
"""
For a given feature, determine if it is real, binary or constant.
Here binary means that only two unique values occur in the feature.
:param feature_column: The feature column
:type feature_column: pandas.Series
:return: 'constant', 'binary' or 'real'
... | [
"For",
"a",
"given",
"feature",
"determine",
"if",
"it",
"is",
"real",
"binary",
"or",
"constant",
".",
"Here",
"binary",
"means",
"that",
"only",
"two",
"unique",
"values",
"occur",
"in",
"the",
"feature",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_selection/relevance.py#L247-L263 | [
"def",
"get_feature_type",
"(",
"feature_column",
")",
":",
"n_unique_values",
"=",
"len",
"(",
"set",
"(",
"feature_column",
".",
"values",
")",
")",
"if",
"n_unique_values",
"==",
"1",
":",
"_logger",
".",
"warning",
"(",
"\"[test_feature_significance] Feature {... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | extract_features | Extract features from
* a :class:`pandas.DataFrame` containing the different time series
or
* a dictionary of :class:`pandas.DataFrame` each containing one type of time series
In both cases a :class:`pandas.DataFrame` with the calculated features will be returned.
For a list of all the calculat... | tsfresh/feature_extraction/extraction.py | def extract_features(timeseries_container, default_fc_parameters=None,
kind_to_fc_parameters=None,
column_id=None, column_sort=None, column_kind=None, column_value=None,
chunksize=defaults.CHUNKSIZE,
n_jobs=defaults.N_PROCESSES, show_wa... | def extract_features(timeseries_container, default_fc_parameters=None,
kind_to_fc_parameters=None,
column_id=None, column_sort=None, column_kind=None, column_value=None,
chunksize=defaults.CHUNKSIZE,
n_jobs=defaults.N_PROCESSES, show_wa... | [
"Extract",
"features",
"from"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/extraction.py#L43-L189 | [
"def",
"extract_features",
"(",
"timeseries_container",
",",
"default_fc_parameters",
"=",
"None",
",",
"kind_to_fc_parameters",
"=",
"None",
",",
"column_id",
"=",
"None",
",",
"column_sort",
"=",
"None",
",",
"column_kind",
"=",
"None",
",",
"column_value",
"=",... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | generate_data_chunk_format | Converts the dataframe df in into a list of individual time seriess.
E.g. the DataFrame
==== ====== =========
id kind val
==== ====== =========
1 a -0.21761
1 a -0.613667
1 a -2.07339
2 b -0.576254
... | tsfresh/feature_extraction/extraction.py | def generate_data_chunk_format(df, column_id, column_kind, column_value):
"""Converts the dataframe df in into a list of individual time seriess.
E.g. the DataFrame
==== ====== =========
id kind val
==== ====== =========
1 a -0.21761
1 a ... | def generate_data_chunk_format(df, column_id, column_kind, column_value):
"""Converts the dataframe df in into a list of individual time seriess.
E.g. the DataFrame
==== ====== =========
id kind val
==== ====== =========
1 a -0.21761
1 a ... | [
"Converts",
"the",
"dataframe",
"df",
"in",
"into",
"a",
"list",
"of",
"individual",
"time",
"seriess",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/extraction.py#L192-L249 | [
"def",
"generate_data_chunk_format",
"(",
"df",
",",
"column_id",
",",
"column_kind",
",",
"column_value",
")",
":",
"MAX_VALUES_GROUPBY",
"=",
"2147483647",
"if",
"df",
"[",
"[",
"column_id",
",",
"column_kind",
"]",
"]",
".",
"nunique",
"(",
")",
".",
"pro... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | _do_extraction | Wrapper around the _do_extraction_on_chunk, which calls it on all chunks in the data frame.
A chunk is a subset of the data, with a given kind and id - so a single time series.
The data is separated out into those single time series and the _do_extraction_on_chunk is
called on each of them. The results are... | tsfresh/feature_extraction/extraction.py | def _do_extraction(df, column_id, column_value, column_kind,
default_fc_parameters, kind_to_fc_parameters,
n_jobs, chunk_size, disable_progressbar, distributor):
"""
Wrapper around the _do_extraction_on_chunk, which calls it on all chunks in the data frame.
A chunk is a... | def _do_extraction(df, column_id, column_value, column_kind,
default_fc_parameters, kind_to_fc_parameters,
n_jobs, chunk_size, disable_progressbar, distributor):
"""
Wrapper around the _do_extraction_on_chunk, which calls it on all chunks in the data frame.
A chunk is a... | [
"Wrapper",
"around",
"the",
"_do_extraction_on_chunk",
"which",
"calls",
"it",
"on",
"all",
"chunks",
"in",
"the",
"data",
"frame",
".",
"A",
"chunk",
"is",
"a",
"subset",
"of",
"the",
"data",
"with",
"a",
"given",
"kind",
"and",
"id",
"-",
"so",
"a",
... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/extraction.py#L252-L335 | [
"def",
"_do_extraction",
"(",
"df",
",",
"column_id",
",",
"column_value",
",",
"column_kind",
",",
"default_fc_parameters",
",",
"kind_to_fc_parameters",
",",
"n_jobs",
",",
"chunk_size",
",",
"disable_progressbar",
",",
"distributor",
")",
":",
"data_in_chunks",
"... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | _do_extraction_on_chunk | Main function of this module: use the feature calculators defined in the
default_fc_parameters or kind_to_fc_parameters parameters and extract all
features on the chunk.
The chunk consists of the chunk id, the chunk kind and the data (as a Series),
which is then converted to a numpy array - so a single... | tsfresh/feature_extraction/extraction.py | def _do_extraction_on_chunk(chunk, default_fc_parameters, kind_to_fc_parameters):
"""
Main function of this module: use the feature calculators defined in the
default_fc_parameters or kind_to_fc_parameters parameters and extract all
features on the chunk.
The chunk consists of the chunk id, the chu... | def _do_extraction_on_chunk(chunk, default_fc_parameters, kind_to_fc_parameters):
"""
Main function of this module: use the feature calculators defined in the
default_fc_parameters or kind_to_fc_parameters parameters and extract all
features on the chunk.
The chunk consists of the chunk id, the chu... | [
"Main",
"function",
"of",
"this",
"module",
":",
"use",
"the",
"feature",
"calculators",
"defined",
"in",
"the",
"default_fc_parameters",
"or",
"kind_to_fc_parameters",
"parameters",
"and",
"extract",
"all",
"features",
"on",
"the",
"chunk",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/extraction.py#L338-L402 | [
"def",
"_do_extraction_on_chunk",
"(",
"chunk",
",",
"default_fc_parameters",
",",
"kind_to_fc_parameters",
")",
":",
"sample_id",
",",
"kind",
",",
"data",
"=",
"chunk",
"if",
"kind_to_fc_parameters",
"and",
"kind",
"in",
"kind_to_fc_parameters",
":",
"fc_parameters"... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | get_config_from_string | Helper function to extract the configuration of a certain function from the column name.
The column name parts (split by "__") should be passed to this function. It will skip the
kind name and the function name and only use the parameter parts. These parts will be split up on "_"
into the parameter name and... | tsfresh/utilities/string_manipulation.py | def get_config_from_string(parts):
"""
Helper function to extract the configuration of a certain function from the column name.
The column name parts (split by "__") should be passed to this function. It will skip the
kind name and the function name and only use the parameter parts. These parts will be ... | def get_config_from_string(parts):
"""
Helper function to extract the configuration of a certain function from the column name.
The column name parts (split by "__") should be passed to this function. It will skip the
kind name and the function name and only use the parameter parts. These parts will be ... | [
"Helper",
"function",
"to",
"extract",
"the",
"configuration",
"of",
"a",
"certain",
"function",
"from",
"the",
"column",
"name",
".",
"The",
"column",
"name",
"parts",
"(",
"split",
"by",
"__",
")",
"should",
"be",
"passed",
"to",
"this",
"function",
".",... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/string_manipulation.py#L10-L44 | [
"def",
"get_config_from_string",
"(",
"parts",
")",
":",
"relevant_parts",
"=",
"parts",
"[",
"2",
":",
"]",
"if",
"not",
"relevant_parts",
":",
"return",
"config_kwargs",
"=",
"[",
"s",
".",
"rsplit",
"(",
"\"_\"",
",",
"1",
")",
"[",
"0",
"]",
"for",... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | convert_to_output_format | Helper function to convert parameters to a valid string, that can be used in a column name.
Does the opposite which is used in the from_columns function.
The parameters are sorted by their name and written out in the form
<param name>_<param value>__<param name>_<param value>__ ...
If a <param_val... | tsfresh/utilities/string_manipulation.py | def convert_to_output_format(param):
"""
Helper function to convert parameters to a valid string, that can be used in a column name.
Does the opposite which is used in the from_columns function.
The parameters are sorted by their name and written out in the form
<param name>_<param value>__<par... | def convert_to_output_format(param):
"""
Helper function to convert parameters to a valid string, that can be used in a column name.
Does the opposite which is used in the from_columns function.
The parameters are sorted by their name and written out in the form
<param name>_<param value>__<par... | [
"Helper",
"function",
"to",
"convert",
"parameters",
"to",
"a",
"valid",
"string",
"that",
"can",
"be",
"used",
"in",
"a",
"column",
"name",
".",
"Does",
"the",
"opposite",
"which",
"is",
"used",
"in",
"the",
"from_columns",
"function",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/string_manipulation.py#L47-L71 | [
"def",
"convert_to_output_format",
"(",
"param",
")",
":",
"def",
"add_parenthesis_if_string_value",
"(",
"x",
")",
":",
"if",
"isinstance",
"(",
"x",
",",
"string_types",
")",
":",
"return",
"'\"'",
"+",
"str",
"(",
"x",
")",
"+",
"'\"'",
"else",
":",
"... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | end_profiling | Helper function to stop the profiling process and write out the profiled
data into the given filename. Before this, sort the stats by the passed sorting.
:param profiler: An already started profiler (probably by start_profiling).
:type profiler: cProfile.Profile
:param filename: The name of the output ... | tsfresh/utilities/profiling.py | def end_profiling(profiler, filename, sorting=None):
"""
Helper function to stop the profiling process and write out the profiled
data into the given filename. Before this, sort the stats by the passed sorting.
:param profiler: An already started profiler (probably by start_profiling).
:type profil... | def end_profiling(profiler, filename, sorting=None):
"""
Helper function to stop the profiling process and write out the profiled
data into the given filename. Before this, sort the stats by the passed sorting.
:param profiler: An already started profiler (probably by start_profiling).
:type profil... | [
"Helper",
"function",
"to",
"stop",
"the",
"profiling",
"process",
"and",
"write",
"out",
"the",
"profiled",
"data",
"into",
"the",
"given",
"filename",
".",
"Before",
"this",
"sort",
"the",
"stats",
"by",
"the",
"passed",
"sorting",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/profiling.py#L39-L67 | [
"def",
"end_profiling",
"(",
"profiler",
",",
"filename",
",",
"sorting",
"=",
"None",
")",
":",
"profiler",
".",
"disable",
"(",
")",
"s",
"=",
"six",
".",
"StringIO",
"(",
")",
"ps",
"=",
"pstats",
".",
"Stats",
"(",
"profiler",
",",
"stream",
"=",... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | PerColumnImputer.fit | Compute the min, max and median for all columns in the DataFrame. For more information,
please see the :func:`~tsfresh.utilities.dataframe_functions.get_range_values_per_column` function.
:param X: DataFrame to calculate min, max and median values on
:type X: pandas.DataFrame
... | tsfresh/transformers/per_column_imputer.py | def fit(self, X, y=None):
"""
Compute the min, max and median for all columns in the DataFrame. For more information,
please see the :func:`~tsfresh.utilities.dataframe_functions.get_range_values_per_column` function.
:param X: DataFrame to calculate min, max and median ... | def fit(self, X, y=None):
"""
Compute the min, max and median for all columns in the DataFrame. For more information,
please see the :func:`~tsfresh.utilities.dataframe_functions.get_range_values_per_column` function.
:param X: DataFrame to calculate min, max and median ... | [
"Compute",
"the",
"min",
"max",
"and",
"median",
"for",
"all",
"columns",
"in",
"the",
"DataFrame",
".",
"For",
"more",
"information",
"please",
"see",
"the",
":",
"func",
":",
"~tsfresh",
".",
"utilities",
".",
"dataframe_functions",
".",
"get_range_values_pe... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/transformers/per_column_imputer.py#L46-L85 | [
"def",
"fit",
"(",
"self",
",",
"X",
",",
"y",
"=",
"None",
")",
":",
"if",
"not",
"isinstance",
"(",
"X",
",",
"pd",
".",
"DataFrame",
")",
":",
"X",
"=",
"pd",
".",
"DataFrame",
"(",
"X",
")",
"col_to_max",
",",
"col_to_min",
",",
"col_to_media... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | PerColumnImputer.transform | Column-wise replace all ``NaNs``, ``-inf`` and ``+inf`` in the DataFrame `X` with average/extreme
values from the provided dictionaries.
:param X: DataFrame to impute
:type X: pandas.DataFrame
:return: imputed DataFrame
:rtype: pandas.DataFrame
:... | tsfresh/transformers/per_column_imputer.py | def transform(self, X):
"""
Column-wise replace all ``NaNs``, ``-inf`` and ``+inf`` in the DataFrame `X` with average/extreme
values from the provided dictionaries.
:param X: DataFrame to impute
:type X: pandas.DataFrame
:return: imputed DataFram... | def transform(self, X):
"""
Column-wise replace all ``NaNs``, ``-inf`` and ``+inf`` in the DataFrame `X` with average/extreme
values from the provided dictionaries.
:param X: DataFrame to impute
:type X: pandas.DataFrame
:return: imputed DataFram... | [
"Column",
"-",
"wise",
"replace",
"all",
"NaNs",
"-",
"inf",
"and",
"+",
"inf",
"in",
"the",
"DataFrame",
"X",
"with",
"average",
"/",
"extreme",
"values",
"from",
"the",
"provided",
"dictionaries",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/transformers/per_column_imputer.py#L87-L109 | [
"def",
"transform",
"(",
"self",
",",
"X",
")",
":",
"if",
"not",
"isinstance",
"(",
"X",
",",
"pd",
".",
"DataFrame",
")",
":",
"X",
"=",
"pd",
".",
"DataFrame",
"(",
"X",
")",
"if",
"self",
".",
"_col_to_NINF_repl",
"is",
"None",
"or",
"self",
... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | download_robot_execution_failures | Download the Robot Execution Failures LP1 Data Set[#1] from the UCI Machine Learning Repository [#2] and store it
locally.
:return:
Examples
========
>>> from tsfresh.examples import download_robot_execution_failures
>>> download_robot_execution_failures() | tsfresh/examples/robot_execution_failures.py | def download_robot_execution_failures():
"""
Download the Robot Execution Failures LP1 Data Set[#1] from the UCI Machine Learning Repository [#2] and store it
locally.
:return:
Examples
========
>>> from tsfresh.examples import download_robot_execution_failures
>>> download_robot_exec... | def download_robot_execution_failures():
"""
Download the Robot Execution Failures LP1 Data Set[#1] from the UCI Machine Learning Repository [#2] and store it
locally.
:return:
Examples
========
>>> from tsfresh.examples import download_robot_execution_failures
>>> download_robot_exec... | [
"Download",
"the",
"Robot",
"Execution",
"Failures",
"LP1",
"Data",
"Set",
"[",
"#1",
"]",
"from",
"the",
"UCI",
"Machine",
"Learning",
"Repository",
"[",
"#2",
"]",
"and",
"store",
"it",
"locally",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/examples/robot_execution_failures.py#L43-L74 | [
"def",
"download_robot_execution_failures",
"(",
")",
":",
"if",
"os",
".",
"path",
".",
"exists",
"(",
"data_file_name",
")",
":",
"_logger",
".",
"warning",
"(",
"\"You have already downloaded the Robot Execution Failures LP1 Data Set.\"",
")",
"return",
"if",
"not",
... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | load_robot_execution_failures | Load the Robot Execution Failures LP1 Data Set[1].
The Time series are passed as a flat DataFrame.
Examples
========
>>> from tsfresh.examples import load_robot_execution_failures
>>> df, y = load_robot_execution_failures()
>>> print(df.shape)
(1320, 8)
:param multiclass: If True, ret... | tsfresh/examples/robot_execution_failures.py | def load_robot_execution_failures(multiclass=False):
"""
Load the Robot Execution Failures LP1 Data Set[1].
The Time series are passed as a flat DataFrame.
Examples
========
>>> from tsfresh.examples import load_robot_execution_failures
>>> df, y = load_robot_execution_failures()
>>> p... | def load_robot_execution_failures(multiclass=False):
"""
Load the Robot Execution Failures LP1 Data Set[1].
The Time series are passed as a flat DataFrame.
Examples
========
>>> from tsfresh.examples import load_robot_execution_failures
>>> df, y = load_robot_execution_failures()
>>> p... | [
"Load",
"the",
"Robot",
"Execution",
"Failures",
"LP1",
"Data",
"Set",
"[",
"1",
"]",
".",
"The",
"Time",
"series",
"are",
"passed",
"as",
"a",
"flat",
"DataFrame",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/examples/robot_execution_failures.py#L77-L123 | [
"def",
"load_robot_execution_failures",
"(",
"multiclass",
"=",
"False",
")",
":",
"if",
"not",
"os",
".",
"path",
".",
"exists",
"(",
"data_file_name",
")",
":",
"raise",
"RuntimeError",
"(",
"UCI_MLD_REF_MSG",
")",
"id_to_target",
"=",
"{",
"}",
"df_rows",
... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | extract_relevant_features | High level convenience function to extract time series features from `timeseries_container`. Then return feature
matrix `X` possibly augmented with relevant features with respect to target vector `y`.
For more details see the documentation of :func:`~tsfresh.feature_extraction.extraction.extract_features` and
... | tsfresh/convenience/relevant_extraction.py | def extract_relevant_features(timeseries_container, y, X=None,
default_fc_parameters=None,
kind_to_fc_parameters=None,
column_id=None, column_sort=None, column_kind=None, column_value=None,
show_warni... | def extract_relevant_features(timeseries_container, y, X=None,
default_fc_parameters=None,
kind_to_fc_parameters=None,
column_id=None, column_sort=None, column_kind=None, column_value=None,
show_warni... | [
"High",
"level",
"convenience",
"function",
"to",
"extract",
"time",
"series",
"features",
"from",
"timeseries_container",
".",
"Then",
"return",
"feature",
"matrix",
"X",
"possibly",
"augmented",
"with",
"relevant",
"features",
"with",
"respect",
"to",
"target",
... | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/convenience/relevant_extraction.py#L13-L181 | [
"def",
"extract_relevant_features",
"(",
"timeseries_container",
",",
"y",
",",
"X",
"=",
"None",
",",
"default_fc_parameters",
"=",
"None",
",",
"kind_to_fc_parameters",
"=",
"None",
",",
"column_id",
"=",
"None",
",",
"column_sort",
"=",
"None",
",",
"column_k... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | sample_tau | Return list of control parameters
:param n: number of samples
:type n: int
:param kappa_3: inverse bifurcation point
:type kappa_3: float
:param ratio: ratio (default 0.5) of samples before and beyond drift-bifurcation
:type ratio: float
:param rel_increase: relative increase from bifu... | tsfresh/examples/driftbif_simulation.py | def sample_tau(n=10, kappa_3=0.3, ratio=0.5, rel_increase=0.15):
"""
Return list of control parameters
:param n: number of samples
:type n: int
:param kappa_3: inverse bifurcation point
:type kappa_3: float
:param ratio: ratio (default 0.5) of samples before and beyond drift-bifurcatio... | def sample_tau(n=10, kappa_3=0.3, ratio=0.5, rel_increase=0.15):
"""
Return list of control parameters
:param n: number of samples
:type n: int
:param kappa_3: inverse bifurcation point
:type kappa_3: float
:param ratio: ratio (default 0.5) of samples before and beyond drift-bifurcatio... | [
"Return",
"list",
"of",
"control",
"parameters"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/examples/driftbif_simulation.py#L105-L127 | [
"def",
"sample_tau",
"(",
"n",
"=",
"10",
",",
"kappa_3",
"=",
"0.3",
",",
"ratio",
"=",
"0.5",
",",
"rel_increase",
"=",
"0.15",
")",
":",
"assert",
"ratio",
">",
"0",
"and",
"ratio",
"<=",
"1",
"assert",
"kappa_3",
">",
"0",
"assert",
"rel_increase... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | load_driftbif | Simulates n time-series with l time steps each for the m-dimensional velocity of a dissipative soliton
classification=True:
target 0 means tau<=1/0.3, Dissipative Soliton with Brownian motion (purely noise driven)
target 1 means tau> 1/0.3, Dissipative Soliton with Active Brownian motion (intrinsiv velocit... | tsfresh/examples/driftbif_simulation.py | def load_driftbif(n, l, m=2, classification=True, kappa_3=0.3, seed=False):
"""
Simulates n time-series with l time steps each for the m-dimensional velocity of a dissipative soliton
classification=True:
target 0 means tau<=1/0.3, Dissipative Soliton with Brownian motion (purely noise driven)
targe... | def load_driftbif(n, l, m=2, classification=True, kappa_3=0.3, seed=False):
"""
Simulates n time-series with l time steps each for the m-dimensional velocity of a dissipative soliton
classification=True:
target 0 means tau<=1/0.3, Dissipative Soliton with Brownian motion (purely noise driven)
targe... | [
"Simulates",
"n",
"time",
"-",
"series",
"with",
"l",
"time",
"steps",
"each",
"for",
"the",
"m",
"-",
"dimensional",
"velocity",
"of",
"a",
"dissipative",
"soliton"
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/examples/driftbif_simulation.py#L130-L185 | [
"def",
"load_driftbif",
"(",
"n",
",",
"l",
",",
"m",
"=",
"2",
",",
"classification",
"=",
"True",
",",
"kappa_3",
"=",
"0.3",
",",
"seed",
"=",
"False",
")",
":",
"# todo: add ratio of classes",
"if",
"m",
">",
"2",
":",
"logging",
".",
"warning",
... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
train | check_for_nans_in_columns | Helper function to check for ``NaN`` in the data frame and raise a ``ValueError`` if there is one.
:param df: the pandas DataFrame to test for NaNs
:type df: pandas.DataFrame
:param columns: a list of columns to test for NaNs. If left empty, all columns of the DataFrame will be tested.
:type columns: l... | tsfresh/utilities/dataframe_functions.py | def check_for_nans_in_columns(df, columns=None):
"""
Helper function to check for ``NaN`` in the data frame and raise a ``ValueError`` if there is one.
:param df: the pandas DataFrame to test for NaNs
:type df: pandas.DataFrame
:param columns: a list of columns to test for NaNs. If left empty, all ... | def check_for_nans_in_columns(df, columns=None):
"""
Helper function to check for ``NaN`` in the data frame and raise a ``ValueError`` if there is one.
:param df: the pandas DataFrame to test for NaNs
:type df: pandas.DataFrame
:param columns: a list of columns to test for NaNs. If left empty, all ... | [
"Helper",
"function",
"to",
"check",
"for",
"NaN",
"in",
"the",
"data",
"frame",
"and",
"raise",
"a",
"ValueError",
"if",
"there",
"is",
"one",
"."
] | blue-yonder/tsfresh | python | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/dataframe_functions.py#L18-L38 | [
"def",
"check_for_nans_in_columns",
"(",
"df",
",",
"columns",
"=",
"None",
")",
":",
"if",
"columns",
"is",
"None",
":",
"columns",
"=",
"df",
".",
"columns",
"if",
"pd",
".",
"isnull",
"(",
"df",
".",
"loc",
"[",
":",
",",
"columns",
"]",
")",
".... | c72c9c574371cf7dd7d54e00a466792792e5d202 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.