repo stringlengths 7 54 | path stringlengths 4 223 | func_name stringlengths 1 134 | original_string stringlengths 75 104k | language stringclasses 1
value | code stringlengths 75 104k | code_tokens listlengths 20 28.4k | docstring stringlengths 1 46.3k | docstring_tokens listlengths 1 1.66k | sha stringlengths 40 40 | url stringlengths 87 315 | partition stringclasses 1
value | summary stringlengths 4 350 | obf_code stringlengths 7.85k 764k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | cid_ce | 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... | python | 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",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"if",
"normalize",
":",
"s",
"... | 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).
... | [
"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... | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L473-L506 | train | This function calculates the value of the CID feature of a time series. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | mean_second_derivative_central | 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... | python | 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",
")",
":",
"diff",
"=",
"(",
"_roll",
"(",
"x",
",",
"1",
")",
"-",
"2",
"*",
"np",
".",
"array",
"(",
"x",
")",
"+",
"_roll",
"(",
"x",
",",
"-",
"1",
")",
")",
"/",
"2.0",
"return",
"np",
".... | 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... | [
"Returns",
"the",
"mean",
"value",
"of",
"a",
"central",
"approximation",
"of",
"the",
"second",
"derivative"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L545-L560 | train | Returns the mean value of a central approximation of the second derivative of the central approximation of the second derivative. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | skewness | 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... | python | 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",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"pd",
".",
"Series",
")",
":",
"x",
"=",
"pd",
".",
"Series",
"(",
"x",
")",
"return",
"pd",
".",
"Series",
".",
"skew",
"(",
"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 | [
"Returns",
"the",
"sample",
"skewness",
"of",
"x",
"(",
"calculated",
"with",
"the",
"adjusted",
"Fisher",
"-",
"Pearson",
"standardized",
"moment",
"coefficient",
"G1",
")",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L634-L646 | train | Returns the sample skewness of x. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | kurtosis | 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(... | python | 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",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"pd",
".",
"Series",
")",
":",
"x",
"=",
"pd",
".",
"Series",
"(",
"x",
")",
"return",
"pd",
".",
"Series",
".",
"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 | [
"Returns",
"the",
"kurtosis",
"of",
"x",
"(",
"calculated",
"with",
"the",
"adjusted",
"Fisher",
"-",
"Pearson",
"standardized",
"moment",
"coefficient",
"G2",
")",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L650-L662 | train | Returns the kurtosis of x | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | longest_strike_below_mean | 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... | python | 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",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"return",
"np",
".",
"max",
"(",
... | 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 | [
"Returns",
"the",
"length",
"of",
"the",
"longest",
"consecutive",
"subsequence",
"in",
"x",
"that",
"is",
"smaller",
"than",
"the",
"mean",
"of",
"x"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L683-L694 | train | Returns the length of the longest consecutive subsequence in x that is smaller than the mean of x | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | count_above_mean | 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 | python | 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",
")",
":",
"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
: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",
"number",
"of",
"values",
"in",
"x",
"that",
"are",
"higher",
"than",
"the",
"mean",
"of",
"x"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L713-L723 | train | Returns the number of values in x that are higher than the mean of x | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | count_below_mean | 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 | python | 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",
")",
":",
"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
: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",
"number",
"of",
"values",
"in",
"x",
"that",
"are",
"lower",
"than",
"the",
"mean",
"of",
"x"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L727-L737 | train | Returns the number of values in x that are lower than the mean of x | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | last_location_of_maximum | 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
... | python | 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",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"return",
"1.0",
"-",
"np",
".",
"argmax",
"(",
"x",
"[",
":",
":",
"-",
"1",
"]",
")",
"/",
"len",
"(",
"x",
")",
"if",
"len",
"(",
"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",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L741-L752 | train | Returns the relative last location of the maximum value of x. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | first_location_of_maximum | 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
"""
... | python | 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",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"return",
"np",
".",
"argmax",
"(... | 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",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L756-L768 | train | Returns the first location of the maximum value of x. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | last_location_of_minimum | 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
"""
... | python | 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",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"return",
"1.0",
"-",
"np",
".",
"argmin",
"(",
"x",
"[",
":",
":",
"-",
"1",
"]",
")",
"/",
"len",
"(",
"x",
")",
"if",
"len",
"(",
"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",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L772-L783 | train | Returns the last location of the minimal value of x. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | first_location_of_minimum | 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
"""
... | python | 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",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"return",
"np",
".",
"argmin",
"(... | 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",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L787-L799 | train | Returns the first location of the minimal value of x. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | percentage_of_reoccurring_datapoints_to_all_datapoints | 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... | python | 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",
")",
":",
"if",
"len",
"(",
"x",
")",
"==",
"0",
":",
"return",
"np",
".",
"nan",
"unique",
",",
"counts",
"=",
"np",
".",
"unique",
"(",
"x",
",",
"return_counts",
"=",
"True",
"... | 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... | [
"Returns",
"the",
"percentage",
"of",
"unique",
"values",
"that",
"are",
"present",
"in",
"the",
"time",
"series",
"more",
"than",
"once",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L803-L826 | train | Returns the percentage of unique values that occurring more than once in the time series x. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | percentage_of_reoccurring_values_to_all_values | 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... | python | 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",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"pd",
".",
"Series",
")",
":",
"x",
"=",
"pd",
".",
"Series",
"(",
"x",
")",
"if",
"x",
".",
"size",
"==",
"0",
":",
"return",
"np"... | 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... | [
"Returns",
"the",
"ratio",
"of",
"unique",
"values",
"that",
"are",
"present",
"in",
"the",
"time",
"series",
"more",
"than",
"once",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L830-L857 | train | Returns the ratio of unique values that occurring more than once to all values. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | sum_of_reoccurring_values | 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... | python | 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",
")",
":",
"unique",
",",
"counts",
"=",
"np",
".",
"unique",
"(",
"x",
",",
"return_counts",
"=",
"True",
")",
"counts",
"[",
"counts",
"<",
"2",
"]",
"=",
"0",
"counts",
"[",
"counts",
">",
"1",
"]",
"... | 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 | [
"Returns",
"the",
"sum",
"of",
"all",
"values",
"that",
"are",
"present",
"in",
"the",
"time",
"series",
"more",
"than",
"once",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L861-L874 | train | Returns the sum of all values that are present in the time series
more than once. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | sum_of_reoccurring_data_points | 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 =... | python | 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",
")",
":",
"unique",
",",
"counts",
"=",
"np",
".",
"unique",
"(",
"x",
",",
"return_counts",
"=",
"True",
")",
"counts",
"[",
"counts",
"<",
"2",
"]",
"=",
"0",
"return",
"np",
".",
"sum",
"(",
"coun... | 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 | [
"Returns",
"the",
"sum",
"of",
"all",
"data",
"points",
"that",
"are",
"present",
"in",
"the",
"time",
"series",
"more",
"than",
"once",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L878-L890 | train | Returns the sum of all data points that are present in the time series
more than once. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | ratio_value_number_to_time_series_length | 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... | python | 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",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"if",
"x",
".",
"siz... | 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
... | [
"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"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L894-L912 | train | Returns a factor which is 1 if all values in the time series occur only once and below one if all values in the time series occur only once and below one if all values in the time series occur only once and below one if this is not the case. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | fft_coefficient | 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,
\... | python | 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",
")",
":",
"assert",
"min",
"(",
"[",
"config",
"[",
"\"coeff\"",
"]",
"for",
"config",
"in",
"param",
"]",
")",
">=",
"0",
",",
"\"Coefficients must be positive or zero.\"",
"assert",
"set",
"(",
"[",
"conf... | 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... | [
"Calculates",
"the",
"fourier",
"coefficients",
"of",
"the",
"one",
"-",
"dimensional",
"discrete",
"Fourier",
"Transform",
"for",
"real",
"input",
"by",
"fast",
"fourier",
"transformation",
"algorithm"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L916-L956 | train | Calculates the fourier coefficients of a one - dimensional discrete Fourier Transform for real input by fast
fourier transformation algorithm. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | fft_aggregated | 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... | python | 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",
")",
":",
"assert",
"set",
"(",
"[",
"config",
"[",
"\"aggtype\"",
"]",
"for",
"config",
"in",
"param",
"]",
")",
"<=",
"set",
"(",
"[",
"\"centroid\"",
",",
"\"variance\"",
",",
"\"skew\"",
",",
"\"kurt... | 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... | [
"Returns",
"the",
"spectral",
"centroid",
"(",
"mean",
")",
"variance",
"skew",
"and",
"kurtosis",
"of",
"the",
"absolute",
"fourier",
"transform",
"spectrum",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L960-L1063 | train | Calculates the spectral centroid variance skew and kurtosis of the absolute fourier transform spectrum. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | number_peaks | 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]... | python | 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",
")",
":",
"x_reduced",
"=",
"x",
"[",
"n",
":",
"-",
"n",
"]",
"res",
"=",
"None",
"for",
"i",
"in",
"range",
"(",
"1",
",",
"n",
"+",
"1",
")",
":",
"result_first",
"=",
"(",
"x_reduced",
">",
"_rol... | 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... | [
"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... | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1067-L1103 | train | Calculates the number of peaks of at least support n in the time series x. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | index_mass_quantile | 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... | python | 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",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"abs_x",
"=",
"np",
".",
"abs",
"(",
"x",
")",
"s",
"=",
"sum",
"(",
"abs_x",
")",
"if",
"s",
"==",
"0",
":",
"# all values in x are ze... | 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... | [
"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",
... | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1107-L1131 | train | This function calculates the relative index i where q% of the mass of the time series x lie left of i. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | number_cwt_peaks | 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... | python | 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",
")",
":",
"return",
"len",
"(",
"find_peaks_cwt",
"(",
"vector",
"=",
"x",
",",
"widths",
"=",
"np",
".",
"array",
"(",
"list",
"(",
"range",
"(",
"1",
",",
"n",
"+",
"1",
")",
")",
")",
",",
"wave... | 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... | [
"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... | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1135-L1148 | train | This feature calculator searches for different peaks in x. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | linear_trend | 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... | python | 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",
")",
":",
"# todo: we could use the index of the DataFrame here",
"linReg",
"=",
"linregress",
"(",
"range",
"(",
"len",
"(",
"x",
")",
")",
",",
"x",
")",
"return",
"[",
"(",
"\"attr_\\\"{}\\\"\"",
".",
"format",... | 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 ... | [
"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... | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1152-L1173 | train | Linear trend of the time series x. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | cwt_coefficients | 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 ... | python | 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",
")",
":",
"calculated_cwt",
"=",
"{",
"}",
"res",
"=",
"[",
"]",
"indices",
"=",
"[",
"]",
"for",
"parameter_combination",
"in",
"param",
":",
"widths",
"=",
"parameter_combination",
"[",
"\"widths\"",
"]"... | 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... | [
"Calculates",
"a",
"Continuous",
"wavelet",
"transform",
"for",
"the",
"Ricker",
"wavelet",
"also",
"known",
"as",
"the",
"Mexican",
"hat",
"wavelet",
"which",
"is",
"defined",
"by"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1177-L1221 | train | Calculates the Continuous wavelet transform for the Ricker wavelet transform. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | spkt_welch_density | 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... | python | 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",
")",
":",
"freq",
",",
"pxx",
"=",
"welch",
"(",
"x",
",",
"nperseg",
"=",
"min",
"(",
"len",
"(",
"x",
")",
",",
"256",
")",
")",
"coeff",
"=",
"[",
"config",
"[",
"\"coeff\"",
"]",
"for",
"... | 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... | [
"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... | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1225-L1254 | train | This function calculates the cross power spectral density of the time series x at different frequencies. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | ar_coefficient | 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... | python | 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",
")",
":",
"calculated_ar_params",
"=",
"{",
"}",
"x_as_list",
"=",
"list",
"(",
"x",
")",
"calculated_AR",
"=",
"AR",
"(",
"x_as_list",
")",
"res",
"=",
"{",
"}",
"for",
"parameter_combination",
"in",
"par... | 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... | [
"This",
"feature",
"calculator",
"fits",
"the",
"unconditional",
"maximum",
"likelihood",
"of",
"an",
"autoregressive",
"AR",
"(",
"k",
")",
"process",
".",
"The",
"k",
"parameter",
"is",
"the",
"maximum",
"lag",
"of",
"the",
"process"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1258-L1307 | train | This function calculates the unconditional maximum likelihood of an autoregressive AR process. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | change_quantiles | 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... | python | 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",
")",
":",
"if",
"ql",
">=",
"qh",
":",
"ValueError",
"(",
"\"ql={} should be lower than qh={}\"",
".",
"format",
"(",
"ql",
",",
"qh",
")",
")",
"div",
"=",
"np",
... | 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... | [
"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",
"... | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1311-L1353 | train | This function fixes a corridor given by the quantiles ql and qh of the distribution of x and calculates the average absolute value of consecutive changes of the series x inside the corridor. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | time_reversal_asymmetry_statistic | 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]
... | python | 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",
")",
":",
"n",
"=",
"len",
"(",
"x",
")",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"if",
"2",
"*",
"lag",
">=",
"n",
":",
"return",
"0",
"else",
":",
"one_lag",
"=",
"_roll",... | 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... | [
"This",
"function",
"calculates",
"the",
"value",
"of"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1358-L1395 | train | This function calculates the value of the time - reversal asymmetry statistic of the given time series. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | c3 | 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... | python | 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",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"n",
"=",
"x",
".",
"size",
"if",
"2... | 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... | [
"This",
"function",
"calculates",
"the",
"value",
"of"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1399-L1435 | train | This function calculates the value of the next nonlinearity in a time series. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | binned_entropy | 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`.
... | python | 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",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"hist",
",",
"bin_edges",
... | 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... | [
"First",
"bins",
"the",
"values",
"of",
"x",
"into",
"max_bins",
"equidistant",
"bins",
".",
"Then",
"calculates",
"the",
"value",
"of"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1439-L1461 | train | Computes the binned entropy of a time series. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | sample_entropy | 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
... | python | 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",
")",
":",
"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... | 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... | [
"Calculate",
"and",
"return",
"sample",
"entropy",
"of",
"x",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1467-L1517 | train | Calculate and return sample entropy of a time series. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | autocorrelation | 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 ... | python | 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",
")",
":",
"# 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",
"=",... | 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... | [
"Calculates",
"the",
"autocorrelation",
"of",
"the",
"specified",
"lag",
"according",
"to",
"the",
"formula",
"[",
"1",
"]"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1521-L1561 | train | Calculates the autocorrelation of the specified lag. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | quantile | 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
... | python | 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",
")",
":",
"x",
"=",
"pd",
".",
"Series",
"(",
"x",
")",
"return",
"pd",
".",
"Series",
".",
"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
:return type: float | [
"Calculates",
"the",
"q",
"quantile",
"of",
"x",
".",
"This",
"is",
"the",
"value",
"of",
"x",
"greater",
"than",
"q%",
"of",
"the",
"ordered",
"values",
"from",
"x",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1565-L1577 | train | Calculates the q quantile of x. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | number_crossing_m | 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... | python | 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",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"# From https://stackoverflow.com/q... | 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... | [
"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",... | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1581-L1598 | train | Calculates the number of crossings of x on m. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | value_count | 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.... | python | 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",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"if",
"np",
".",
"isnan",
"("... | 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 | [
"Count",
"occurrences",
"of",
"value",
"in",
"time",
"series",
"x",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1630-L1647 | train | Count occurrences of value in time series x. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | range_count | 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
... | python | 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",
")",
":",
"return",
"np",
".",
"sum",
"(",
"(",
"x",
">=",
"min",
")",
"&",
"(",
"x",
"<",
"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
:type max: int or float
:return: t... | [
"Count",
"observed",
"values",
"within",
"the",
"interval",
"[",
"min",
"max",
")",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1651-L1664 | train | Count observed values within the interval [ min max ). | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | approximate_entropy | 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) -
... | python | 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",
")",
":",
"if",
"not",
"isinstance",
"(",
"x",
",",
"(",
"np",
".",
"ndarray",
",",
"pd",
".",
"Series",
")",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"N",
"=",
"x",
... | 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 ... | [
"Implements",
"a",
"vectorized",
"Approximate",
"entropy",
"algorithm",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1669-L1713 | train | This method calculates the approximate entropy of a time series with a given level. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | friedrich_coefficients | 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 ... | python | 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",
")",
":",
"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... | 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... | [
"Coefficients",
"of",
"polynomial",
":",
"math",
":",
"h",
"(",
"x",
")",
"which",
"has",
"been",
"fitted",
"to",
"the",
"deterministic",
"dynamics",
"of",
"Langevin",
"model"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1717-L1764 | train | Calculates the friedrich coefficients of the current system of the system of the current system of the current system of the current system of the current system of the current system. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | max_langevin_fixed_point | 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... | python | 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",
")",
":",
"coeff",
"=",
"_estimate_friedrich_coefficients",
"(",
"x",
",",
"m",
",",
"r",
")",
"try",
":",
"max_fixed_point",
"=",
"np",
".",
"max",
"(",
"np",
".",
"real",
"(",
"np",
"... | 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... | [
"Largest",
"fixed",
"point",
"of",
"dynamics",
":",
"math",
":",
"argmax_x",
"{",
"h",
"(",
"x",
")",
"=",
"0",
"}",
"estimated",
"from",
"polynomial",
":",
"math",
":",
"h",
"(",
"x",
")",
"which",
"has",
"been",
"fitted",
"to",
"the",
"deterministi... | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1768-L1801 | train | Estimate the maximum fixed point of the deterministic dynamics of Langevin model. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | agg_linear_trend | 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... | python | 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",
")",
":",
"# todo: we could use the index of the DataFrame here",
"calculated_agg",
"=",
"{",
"}",
"res_data",
"=",
"[",
"]",
"res_index",
"=",
"[",
"]",
"for",
"parameter_combination",
"in",
"param",
":",
"chunk_... | 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... | [
"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"... | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1805-L1854 | train | Calculates a linear least - squares regression for values of the time series x. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | energy_ratio_by_chunks | 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... | python | 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",
")",
":",
"res_data",
"=",
"[",
"]",
"res_index",
"=",
"[",
"]",
"full_series_energy",
"=",
"np",
".",
"sum",
"(",
"x",
"**",
"2",
")",
"for",
"parameter_combination",
"in",
"param",
":",
"num_segm... | 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.
... | [
"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",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1858-L1892 | train | 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. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/feature_calculators.py | linear_trend_timewise | 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... | python | 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",
")",
":",
"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",
"-",
"... | 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... | [
"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... | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/feature_calculators.py#L1899-L1927 | train | This function calculates 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. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/transformers/feature_selector.py | FeatureSelector.fit | 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... | python | 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",
")",
":",
"if",
"not",
"isinstance",
"(",
"X",
",",
"pd",
".",
"DataFrame",
")",
":",
"X",
"=",
"pd",
".",
"DataFrame",
"(",
"X",
".",
"copy",
"(",
")",
")",
"if",
"not",
"isinstance",
"(",
"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. The index of all
rows in X must be ... | [
"Extract",
"the",
"information",
"which",
"of",
"the",
"features",
"are",
"relevent",
"using",
"the",
"given",
"target",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/transformers/feature_selector.py#L118-L151 | train | This method calculates the relevance table for the given features and returns the fitted estimator with the information which features are relevant. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/transformers/feature_selector.py | FeatureSelector.transform | 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 ... | python | 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",
")",
":",
"if",
"self",
".",
"relevant_features",
"is",
"None",
":",
"raise",
"RuntimeError",
"(",
"\"You have to call fit before.\"",
")",
"if",
"isinstance",
"(",
"X",
",",
"pd",
".",
"DataFrame",
")",
":",
"ret... | 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... | [
"Delete",
"all",
"features",
"which",
"were",
"not",
"relevant",
"in",
"the",
"fit",
"phase",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/transformers/feature_selector.py#L153-L169 | train | Delete all features which were not relevant in the fit phase. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/examples/har_dataset.py | download_har_dataset | 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... | python | 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",
"(",
")",
":",
"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",
".",
... | 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() | [
"Download",
"human",
"activity",
"recognition",
"dataset",
"from",
"UCI",
"ML",
"Repository",
"and",
"store",
"it",
"at",
"/",
"tsfresh",
"/",
"notebooks",
"/",
"data",
".",
"Examples",
"========"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/examples/har_dataset.py#L38-L58 | train | Download the Human Activity Recognition Dataset from UCI ML Repository and store it at the data_file_name_dataset and data_file_name_classes. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/transformers/feature_augmenter.py | FeatureAugmenter.transform | 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... | python | 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",
")",
":",
"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 ... | 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... | [
"Add",
"the",
"features",
"calculated",
"using",
"the",
"timeseries_container",
"and",
"add",
"them",
"to",
"the",
"corresponding",
"rows",
"in",
"the",
"input",
"pandas",
".",
"DataFrame",
"X",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/transformers/feature_augmenter.py#L166-L202 | train | This method transforms the input dataframe X into a new dataframe with the features calculated using the timeseries_container method. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/transformers/relevant_feature_augmenter.py | RelevantFeatureAugmenter.fit | 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.
... | python | 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",
")",
":",
"if",
"self",
".",
"timeseries_container",
"is",
"None",
":",
"raise",
"RuntimeError",
"(",
"\"You have to provide a time series using the set_timeseries_container function before.\"",
")",
"self",
".",
"feature... | 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... | [
"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... | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/transformers/relevant_feature_augmenter.py#L228-L268 | train | Fits the estimator with the information of the features of X and y. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/transformers/relevant_feature_augmenter.py | RelevantFeatureAugmenter.transform | 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 ... | python | 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",
")",
":",
"if",
"self",
".",
"feature_selector",
".",
"relevant_features",
"is",
"None",
":",
"raise",
"RuntimeError",
"(",
"\"You have to call fit before.\"",
")",
"if",
"self",
".",
"timeseries_container",
"is",
"None... | 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... | [
"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",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/transformers/relevant_feature_augmenter.py#L270-L321 | train | This method transforms the data frame X into a new data frame with the same information as X but with added irrelevant features removed irrelevant features. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_selection/relevance.py | calculate_relevance_table | 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,
... | python | 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",
".",
"T... | 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... | [
"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... | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_selection/relevance.py#L31-L191 | train | Calculates the relevance table for the features contained in feature matrix X with respect to target vector y. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_selection/relevance.py | infer_ml_task | 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... | python | 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",
")",
":",
"if",
"y",
".",
"dtype",
".",
"kind",
"in",
"np",
".",
"typecodes",
"[",
"'AllInteger'",
"]",
"or",
"y",
".",
"dtype",
"==",
"np",
".",
"object",
":",
"ml_task",
"=",
"'classification'",
"else",
":",
"ml_ta... | 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
... | [
"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... | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_selection/relevance.py#L208-L226 | train | Infer the machine learning task to select for. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_selection/relevance.py | combine_relevance_tables | 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... | python | 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",
")",
":",
"def",
"_combine",
"(",
"a",
",",
"b",
")",
":",
"a",
".",
"relevant",
"|=",
"b",
".",
"relevant",
"a",
".",
"p_value",
"=",
"a",
".",
"p_value",
".",
"combine",
"(",
"b",
".",
"p_... | 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 | [
"Create",
"a",
"combined",
"relevance",
"table",
"out",
"of",
"a",
"list",
"of",
"relevance",
"tables",
"aggregating",
"the",
"p",
"-",
"values",
"and",
"the",
"relevances",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_selection/relevance.py#L229-L244 | train | Create a combined relevance table out of a list of relevance tables. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_selection/relevance.py | get_feature_type | 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'
... | python | 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",
")",
":",
"n_unique_values",
"=",
"len",
"(",
"set",
"(",
"feature_column",
".",
"values",
")",
")",
"if",
"n_unique_values",
"==",
"1",
":",
"_logger",
".",
"warning",
"(",
"\"[test_feature_significance] Feature {... | 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",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_selection/relevance.py#L247-L263 | train | Determines if a given feature is real binary or real. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/extraction.py | extract_features | 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... | python | 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",
"=",... | 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... | [
"Extract",
"features",
"from"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/extraction.py#L43-L189 | train | Extract features from a time series container. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/extraction.py | generate_data_chunk_format | 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 ... | python | 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",
")",
":",
"MAX_VALUES_GROUPBY",
"=",
"2147483647",
"if",
"df",
"[",
"[",
"column_id",
",",
"column_kind",
"]",
"]",
".",
"nunique",
"(",
")",
".",
"pro... | 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
... | [
"Converts",
"the",
"dataframe",
"df",
"in",
"into",
"a",
"list",
"of",
"individual",
"time",
"seriess",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/extraction.py#L192-L249 | train | Generates the data in a list of individual time series containers. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/extraction.py | _do_extraction | 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... | python | 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",
")",
":",
"data_in_chunks",
"... | 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... | [
"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",
... | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/extraction.py#L252-L335 | train | Internal function to extract a single object from a dataframe. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_extraction/extraction.py | _do_extraction_on_chunk | 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... | python | 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",
")",
":",
"sample_id",
",",
"kind",
",",
"data",
"=",
"chunk",
"if",
"kind_to_fc_parameters",
"and",
"kind",
"in",
"kind_to_fc_parameters",
":",
"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 chunk kind and the data (as a Series),
which is then converted to a numpy array - so a single... | [
"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",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_extraction/extraction.py#L338-L402 | train | This function is used to extract all features from a chunk. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/utilities/string_manipulation.py | get_config_from_string | 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 ... | python | 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",
")",
":",
"relevant_parts",
"=",
"parts",
"[",
"2",
":",
"]",
"if",
"not",
"relevant_parts",
":",
"return",
"config_kwargs",
"=",
"[",
"s",
".",
"rsplit",
"(",
"\"_\"",
",",
"1",
")",
"[",
"0",
"]",
"for",... | 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... | [
"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",
".",... | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/string_manipulation.py#L10-L44 | train | This function extracts the configuration of a certain function from the column name. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/utilities/string_manipulation.py | convert_to_output_format | 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... | python | 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",
")",
":",
"def",
"add_parenthesis_if_string_value",
"(",
"x",
")",
":",
"if",
"isinstance",
"(",
"x",
",",
"string_types",
")",
":",
"return",
"'\"'",
"+",
"str",
"(",
"x",
")",
"+",
"'\"'",
"else",
":",
"... | 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... | [
"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",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/string_manipulation.py#L47-L71 | train | Helper function to convert parameters to a valid string in the output format. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/utilities/profiling.py | end_profiling | 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... | python | 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",
")",
":",
"profiler",
".",
"disable",
"(",
")",
"s",
"=",
"six",
".",
"StringIO",
"(",
")",
"ps",
"=",
"pstats",
".",
"Stats",
"(",
"profiler",
",",
"stream",
"=",... | 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 ... | [
"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",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/profiling.py#L39-L67 | train | End the profiling process and write out the profiled
data into a file. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/transformers/per_column_imputer.py | PerColumnImputer.fit | 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 ... | python | 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",
")",
":",
"if",
"not",
"isinstance",
"(",
"X",
",",
"pd",
".",
"DataFrame",
")",
":",
"X",
"=",
"pd",
".",
"DataFrame",
"(",
"X",
")",
"col_to_max",
",",
"col_to_min",
",",
"col_to_media... | 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
... | [
"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... | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/transformers/per_column_imputer.py#L46-L85 | train | Compute the min max and median for all columns in the DataFrame. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/transformers/per_column_imputer.py | PerColumnImputer.transform | 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... | python | 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",
")",
":",
"if",
"not",
"isinstance",
"(",
"X",
",",
"pd",
".",
"DataFrame",
")",
":",
"X",
"=",
"pd",
".",
"DataFrame",
"(",
"X",
")",
"if",
"self",
".",
"_col_to_NINF_repl",
"is",
"None",
"or",
"self",
... | 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
:... | [
"Column",
"-",
"wise",
"replace",
"all",
"NaNs",
"-",
"inf",
"and",
"+",
"inf",
"in",
"the",
"DataFrame",
"X",
"with",
"average",
"/",
"extreme",
"values",
"from",
"the",
"provided",
"dictionaries",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/transformers/per_column_imputer.py#L87-L109 | train | Column - wise replace all NaNs - inf and + inf in the DataFrame X with average / extreme
values from the provided dictionaries. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/examples/robot_execution_failures.py | download_robot_execution_failures | 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... | python | 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",
"(",
")",
":",
"if",
"os",
".",
"path",
".",
"exists",
"(",
"data_file_name",
")",
":",
"_logger",
".",
"warning",
"(",
"\"You have already downloaded the Robot Execution Failures LP1 Data Set.\"",
")",
"return",
"if",
"not",
... | 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() | [
"Download",
"the",
"Robot",
"Execution",
"Failures",
"LP1",
"Data",
"Set",
"[",
"#1",
"]",
"from",
"the",
"UCI",
"Machine",
"Learning",
"Repository",
"[",
"#2",
"]",
"and",
"store",
"it",
"locally",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/examples/robot_execution_failures.py#L43-L74 | train | Download the Robot Execution Failures LP1 Data Set from the UCI Machine Learning Repository and store it locally. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/examples/robot_execution_failures.py | load_robot_execution_failures | 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... | python | 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",
")",
":",
"if",
"not",
"os",
".",
"path",
".",
"exists",
"(",
"data_file_name",
")",
":",
"raise",
"RuntimeError",
"(",
"UCI_MLD_REF_MSG",
")",
"id_to_target",
"=",
"{",
"}",
"df_rows",
... | 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... | [
"Load",
"the",
"Robot",
"Execution",
"Failures",
"LP1",
"Data",
"Set",
"[",
"1",
"]",
".",
"The",
"Time",
"series",
"are",
"passed",
"as",
"a",
"flat",
"DataFrame",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/examples/robot_execution_failures.py#L77-L123 | train | Load the Robot Execution Failures LP1 Data Set [ 1 ]. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/convenience/relevant_extraction.py | extract_relevant_features | 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... | python | 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_k... | 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
... | [
"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",
... | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/convenience/relevant_extraction.py#L13-L181 | train | This function extracts the relevant features from a timeseries_container and returns the matrix X with respect to target vector y. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/examples/driftbif_simulation.py | sample_tau | 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... | python | 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",
")",
":",
"assert",
"ratio",
">",
"0",
"and",
"ratio",
"<=",
"1",
"assert",
"kappa_3",
">",
"0",
"assert",
"rel_increase... | 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... | [
"Return",
"list",
"of",
"control",
"parameters"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/examples/driftbif_simulation.py#L105-L127 | train | Sample the tau of a bifurcation control parameter. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/examples/driftbif_simulation.py | load_driftbif | 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... | python | 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",
")",
":",
"# todo: add ratio of classes",
"if",
"m",
">",
"2",
":",
"logging",
".",
"warning",
... | 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... | [
"Simulates",
"n",
"time",
"-",
"series",
"with",
"l",
"time",
"steps",
"each",
"for",
"the",
"m",
"-",
"dimensional",
"velocity",
"of",
"a",
"dissipative",
"soliton"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/examples/driftbif_simulation.py#L130-L185 | train | Load a dissipative soliton with l time steps each for the m - dimensional velocity of a dissipative soliton and the target vector. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/utilities/dataframe_functions.py | check_for_nans_in_columns | 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 ... | python | 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",
")",
":",
"if",
"columns",
"is",
"None",
":",
"columns",
"=",
"df",
".",
"columns",
"if",
"pd",
".",
"isnull",
"(",
"df",
".",
"loc",
"[",
":",
",",
"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... | [
"Helper",
"function",
"to",
"check",
"for",
"NaN",
"in",
"the",
"data",
"frame",
"and",
"raise",
"a",
"ValueError",
"if",
"there",
"is",
"one",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/dataframe_functions.py#L18-L38 | train | Helper function to check for NaNs in the DataFrame and raise a ValueError if there is one. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/utilities/dataframe_functions.py | impute | def impute(df_impute):
"""
Columnwise replaces all ``NaNs`` and ``infs`` from the DataFrame `df_impute` with average/extreme values from
the same columns. This is done as follows: Each occurring ``inf`` or ``NaN`` in `df_impute` is replaced by
* ``-inf`` -> ``min``
* ``+inf`` -> ``max``
... | python | def impute(df_impute):
"""
Columnwise replaces all ``NaNs`` and ``infs`` from the DataFrame `df_impute` with average/extreme values from
the same columns. This is done as follows: Each occurring ``inf`` or ``NaN`` in `df_impute` is replaced by
* ``-inf`` -> ``min``
* ``+inf`` -> ``max``
... | [
"def",
"impute",
"(",
"df_impute",
")",
":",
"col_to_max",
",",
"col_to_min",
",",
"col_to_median",
"=",
"get_range_values_per_column",
"(",
"df_impute",
")",
"df_impute",
"=",
"impute_dataframe_range",
"(",
"df_impute",
",",
"col_to_max",
",",
"col_to_min",
",",
... | Columnwise replaces all ``NaNs`` and ``infs`` from the DataFrame `df_impute` with average/extreme values from
the same columns. This is done as follows: Each occurring ``inf`` or ``NaN`` in `df_impute` is replaced by
* ``-inf`` -> ``min``
* ``+inf`` -> ``max``
* ``NaN`` -> ``median``
I... | [
"Columnwise",
"replaces",
"all",
"NaNs",
"and",
"infs",
"from",
"the",
"DataFrame",
"df_impute",
"with",
"average",
"/",
"extreme",
"values",
"from",
"the",
"same",
"columns",
".",
"This",
"is",
"done",
"as",
"follows",
":",
"Each",
"occurring",
"inf",
"or",... | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/dataframe_functions.py#L41-L66 | train | This function imputes all NaNs and infs from the DataFrame df_impute with average and extreme values from
. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/utilities/dataframe_functions.py | impute_dataframe_zero | def impute_dataframe_zero(df_impute):
"""
Replaces all ``NaNs``, ``-infs`` and ``+infs`` from the DataFrame `df_impute` with 0s.
The `df_impute` will be modified in place. All its columns will be into converted into dtype ``np.float64``.
:param df_impute: DataFrame to impute
:type df_impute: pandas... | python | def impute_dataframe_zero(df_impute):
"""
Replaces all ``NaNs``, ``-infs`` and ``+infs`` from the DataFrame `df_impute` with 0s.
The `df_impute` will be modified in place. All its columns will be into converted into dtype ``np.float64``.
:param df_impute: DataFrame to impute
:type df_impute: pandas... | [
"def",
"impute_dataframe_zero",
"(",
"df_impute",
")",
":",
"df_impute",
".",
"replace",
"(",
"[",
"np",
".",
"PINF",
",",
"np",
".",
"NINF",
"]",
",",
"0",
",",
"inplace",
"=",
"True",
")",
"df_impute",
".",
"fillna",
"(",
"0",
",",
"inplace",
"=",
... | Replaces all ``NaNs``, ``-infs`` and ``+infs`` from the DataFrame `df_impute` with 0s.
The `df_impute` will be modified in place. All its columns will be into converted into dtype ``np.float64``.
:param df_impute: DataFrame to impute
:type df_impute: pandas.DataFrame
:return df_impute: imputed DataFra... | [
"Replaces",
"all",
"NaNs",
"-",
"infs",
"and",
"+",
"infs",
"from",
"the",
"DataFrame",
"df_impute",
"with",
"0s",
".",
"The",
"df_impute",
"will",
"be",
"modified",
"in",
"place",
".",
"All",
"its",
"columns",
"will",
"be",
"into",
"converted",
"into",
... | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/dataframe_functions.py#L69-L86 | train | Impute all NaNs - infs and + infs from the DataFrame df_impute with 0s. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/utilities/dataframe_functions.py | impute_dataframe_range | def impute_dataframe_range(df_impute, col_to_max, col_to_min, col_to_median):
"""
Columnwise replaces all ``NaNs``, ``-inf`` and ``+inf`` from the DataFrame `df_impute` with average/extreme values
from the provided dictionaries.
This is done as follows: Each occurring ``inf`` or ``NaN`` in `df_impute` ... | python | def impute_dataframe_range(df_impute, col_to_max, col_to_min, col_to_median):
"""
Columnwise replaces all ``NaNs``, ``-inf`` and ``+inf`` from the DataFrame `df_impute` with average/extreme values
from the provided dictionaries.
This is done as follows: Each occurring ``inf`` or ``NaN`` in `df_impute` ... | [
"def",
"impute_dataframe_range",
"(",
"df_impute",
",",
"col_to_max",
",",
"col_to_min",
",",
"col_to_median",
")",
":",
"columns",
"=",
"df_impute",
".",
"columns",
"# Making sure col_to_median, col_to_max and col_to_min have entries for every column",
"if",
"not",
"set",
... | Columnwise replaces all ``NaNs``, ``-inf`` and ``+inf`` from the DataFrame `df_impute` with average/extreme values
from the provided dictionaries.
This is done as follows: Each occurring ``inf`` or ``NaN`` in `df_impute` is replaced by
* ``-inf`` -> by value in col_to_min
* ``+inf`` -> by valu... | [
"Columnwise",
"replaces",
"all",
"NaNs",
"-",
"inf",
"and",
"+",
"inf",
"from",
"the",
"DataFrame",
"df_impute",
"with",
"average",
"/",
"extreme",
"values",
"from",
"the",
"provided",
"dictionaries",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/dataframe_functions.py#L89-L147 | train | This method replaces all NaNs - inf + inf and + inf in a DataFrame df_impute with average / extreme values
. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/utilities/dataframe_functions.py | get_range_values_per_column | def get_range_values_per_column(df):
"""
Retrieves the finite max, min and mean values per column in the DataFrame `df` and stores them in three
dictionaries. Those dictionaries `col_to_max`, `col_to_min`, `col_to_median` map the columnname to the maximal,
minimal or median value of that column.
If... | python | def get_range_values_per_column(df):
"""
Retrieves the finite max, min and mean values per column in the DataFrame `df` and stores them in three
dictionaries. Those dictionaries `col_to_max`, `col_to_min`, `col_to_median` map the columnname to the maximal,
minimal or median value of that column.
If... | [
"def",
"get_range_values_per_column",
"(",
"df",
")",
":",
"data",
"=",
"df",
".",
"get_values",
"(",
")",
"masked",
"=",
"np",
".",
"ma",
".",
"masked_invalid",
"(",
"data",
")",
"columns",
"=",
"df",
".",
"columns",
"is_col_non_finite",
"=",
"masked",
... | Retrieves the finite max, min and mean values per column in the DataFrame `df` and stores them in three
dictionaries. Those dictionaries `col_to_max`, `col_to_min`, `col_to_median` map the columnname to the maximal,
minimal or median value of that column.
If a column does not contain any finite values at a... | [
"Retrieves",
"the",
"finite",
"max",
"min",
"and",
"mean",
"values",
"per",
"column",
"in",
"the",
"DataFrame",
"df",
"and",
"stores",
"them",
"in",
"three",
"dictionaries",
".",
"Those",
"dictionaries",
"col_to_max",
"col_to_min",
"col_to_median",
"map",
"the",... | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/dataframe_functions.py#L150-L183 | train | Returns the finite max min and mean values per column in the DataFrame df. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/utilities/dataframe_functions.py | restrict_input_to_index | def restrict_input_to_index(df_or_dict, column_id, index):
"""
Restrict df_or_dict to those ids contained in index.
:param df_or_dict: a pandas DataFrame or a dictionary.
:type df_or_dict: pandas.DataFrame or dict
:param column_id: it must be present in the pandas DataFrame or in all DataFrames in ... | python | def restrict_input_to_index(df_or_dict, column_id, index):
"""
Restrict df_or_dict to those ids contained in index.
:param df_or_dict: a pandas DataFrame or a dictionary.
:type df_or_dict: pandas.DataFrame or dict
:param column_id: it must be present in the pandas DataFrame or in all DataFrames in ... | [
"def",
"restrict_input_to_index",
"(",
"df_or_dict",
",",
"column_id",
",",
"index",
")",
":",
"if",
"isinstance",
"(",
"df_or_dict",
",",
"pd",
".",
"DataFrame",
")",
":",
"df_or_dict_restricted",
"=",
"df_or_dict",
"[",
"df_or_dict",
"[",
"column_id",
"]",
"... | Restrict df_or_dict to those ids contained in index.
:param df_or_dict: a pandas DataFrame or a dictionary.
:type df_or_dict: pandas.DataFrame or dict
:param column_id: it must be present in the pandas DataFrame or in all DataFrames in the dictionary.
It is not allowed to have NaN values in this co... | [
"Restrict",
"df_or_dict",
"to",
"those",
"ids",
"contained",
"in",
"index",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/dataframe_functions.py#L186-L210 | train | Restrict the input to those ids contained in index. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/utilities/dataframe_functions.py | get_ids | def get_ids(df_or_dict, column_id):
"""
Aggregates all ids in column_id from the time series container `
:param df_or_dict: a pandas DataFrame or a dictionary.
:type df_or_dict: pandas.DataFrame or dict
:param column_id: it must be present in the pandas DataFrame or in all DataFrames in the diction... | python | def get_ids(df_or_dict, column_id):
"""
Aggregates all ids in column_id from the time series container `
:param df_or_dict: a pandas DataFrame or a dictionary.
:type df_or_dict: pandas.DataFrame or dict
:param column_id: it must be present in the pandas DataFrame or in all DataFrames in the diction... | [
"def",
"get_ids",
"(",
"df_or_dict",
",",
"column_id",
")",
":",
"if",
"isinstance",
"(",
"df_or_dict",
",",
"pd",
".",
"DataFrame",
")",
":",
"return",
"set",
"(",
"df_or_dict",
"[",
"column_id",
"]",
")",
"elif",
"isinstance",
"(",
"df_or_dict",
",",
"... | Aggregates all ids in column_id from the time series container `
:param df_or_dict: a pandas DataFrame or a dictionary.
:type df_or_dict: pandas.DataFrame or dict
:param column_id: it must be present in the pandas DataFrame or in all DataFrames in the dictionary.
It is not allowed to have NaN value... | [
"Aggregates",
"all",
"ids",
"in",
"column_id",
"from",
"the",
"time",
"series",
"container"
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/dataframe_functions.py#L213-L232 | train | Aggregates all ids in column_id from the time series container. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/utilities/dataframe_functions.py | _normalize_input_to_internal_representation | def _normalize_input_to_internal_representation(timeseries_container, column_id, column_sort, column_kind, column_value):
"""
Try to transform any given input to the internal representation of time series, which is a flat DataFrame
(the first format from see :ref:`data-formats-label`).
This function ca... | python | def _normalize_input_to_internal_representation(timeseries_container, column_id, column_sort, column_kind, column_value):
"""
Try to transform any given input to the internal representation of time series, which is a flat DataFrame
(the first format from see :ref:`data-formats-label`).
This function ca... | [
"def",
"_normalize_input_to_internal_representation",
"(",
"timeseries_container",
",",
"column_id",
",",
"column_sort",
",",
"column_kind",
",",
"column_value",
")",
":",
"# Also make it possible to have a dict as an input",
"if",
"isinstance",
"(",
"timeseries_container",
","... | Try to transform any given input to the internal representation of time series, which is a flat DataFrame
(the first format from see :ref:`data-formats-label`).
This function can transform pandas DataFrames in different formats or dictionaries into the internal format
that we use. It should not be called b... | [
"Try",
"to",
"transform",
"any",
"given",
"input",
"to",
"the",
"internal",
"representation",
"of",
"time",
"series",
"which",
"is",
"a",
"flat",
"DataFrame",
"(",
"the",
"first",
"format",
"from",
"see",
":",
"ref",
":",
"data",
"-",
"formats",
"-",
"la... | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/dataframe_functions.py#L237-L351 | train | Normalizes any input to the internal representation of the time series. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/utilities/dataframe_functions.py | roll_time_series | def roll_time_series(df_or_dict, column_id, column_sort, column_kind, rolling_direction, max_timeshift=None):
"""
This method creates sub windows of the time series. It rolls the (sorted) data frames for each kind and each id
separately in the "time" domain (which is represented by the sort order of the sor... | python | def roll_time_series(df_or_dict, column_id, column_sort, column_kind, rolling_direction, max_timeshift=None):
"""
This method creates sub windows of the time series. It rolls the (sorted) data frames for each kind and each id
separately in the "time" domain (which is represented by the sort order of the sor... | [
"def",
"roll_time_series",
"(",
"df_or_dict",
",",
"column_id",
",",
"column_sort",
",",
"column_kind",
",",
"rolling_direction",
",",
"max_timeshift",
"=",
"None",
")",
":",
"if",
"rolling_direction",
"==",
"0",
":",
"raise",
"ValueError",
"(",
"\"Rolling directi... | This method creates sub windows of the time series. It rolls the (sorted) data frames for each kind and each id
separately in the "time" domain (which is represented by the sort order of the sort column given by `column_sort`).
For each rolling step, a new id is created by the scheme "id={id}, shift={shift}", ... | [
"This",
"method",
"creates",
"sub",
"windows",
"of",
"the",
"time",
"series",
".",
"It",
"rolls",
"the",
"(",
"sorted",
")",
"data",
"frames",
"for",
"each",
"kind",
"and",
"each",
"id",
"separately",
"in",
"the",
"time",
"domain",
"(",
"which",
"is",
... | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/dataframe_functions.py#L354-L471 | train | This method creates a new time series in the time domain. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/utilities/dataframe_functions.py | make_forecasting_frame | def make_forecasting_frame(x, kind, max_timeshift, rolling_direction):
"""
Takes a singular time series x and constructs a DataFrame df and target vector y that can be used for a time series
forecasting task.
The returned df will contain, for every time stamp in x, the last max_timeshift data points as... | python | def make_forecasting_frame(x, kind, max_timeshift, rolling_direction):
"""
Takes a singular time series x and constructs a DataFrame df and target vector y that can be used for a time series
forecasting task.
The returned df will contain, for every time stamp in x, the last max_timeshift data points as... | [
"def",
"make_forecasting_frame",
"(",
"x",
",",
"kind",
",",
"max_timeshift",
",",
"rolling_direction",
")",
":",
"n",
"=",
"len",
"(",
"x",
")",
"if",
"isinstance",
"(",
"x",
",",
"pd",
".",
"Series",
")",
":",
"t",
"=",
"x",
".",
"index",
"else",
... | Takes a singular time series x and constructs a DataFrame df and target vector y that can be used for a time series
forecasting task.
The returned df will contain, for every time stamp in x, the last max_timeshift data points as a new
time series, such can be used to fit a time series forecasting model.
... | [
"Takes",
"a",
"singular",
"time",
"series",
"x",
"and",
"constructs",
"a",
"DataFrame",
"df",
"and",
"target",
"vector",
"y",
"that",
"can",
"be",
"used",
"for",
"a",
"time",
"series",
"forecasting",
"task",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/utilities/dataframe_functions.py#L474-L533 | train | Takes a singular time series x and creates a DataFrame df and target vector y that can be used for a time series forecasting task. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
blue-yonder/tsfresh | tsfresh/feature_selection/selection.py | select_features | def select_features(X, y, 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,
test_for_real_target_binary_feature=defaults.TEST_FOR_REAL_TARGET_BINARY_FEATURE,
... | python | def select_features(X, y, 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,
test_for_real_target_binary_feature=defaults.TEST_FOR_REAL_TARGET_BINARY_FEATURE,
... | [
"def",
"select_features",
"(",
"X",
",",
"y",
",",
"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",
",",
"test_for_rea... | Check the significance of all features (columns) of feature matrix X and return a possibly reduced feature matrix
only containing relevant features.
The feature matrix must be a pandas.DataFrame in the format:
+-------+-----------+-----------+-----+-----------+
| index | feature_1 | feature_2 ... | [
"Check",
"the",
"significance",
"of",
"all",
"features",
"(",
"columns",
")",
"of",
"feature",
"matrix",
"X",
"and",
"return",
"a",
"possibly",
"reduced",
"feature",
"matrix",
"only",
"containing",
"relevant",
"features",
"."
] | c72c9c574371cf7dd7d54e00a466792792e5d202 | https://github.com/blue-yonder/tsfresh/blob/c72c9c574371cf7dd7d54e00a466792792e5d202/tsfresh/feature_selection/selection.py#L22-L153 | train | Select features from a matrix X and a vector y. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.connect | def connect(
self, host: str = '127.0.0.1', port: int = 7497,
clientId: int = 1, timeout: float = 2):
"""
Connect to a running TWS or IB gateway application.
After the connection is made the client is fully synchronized
and ready to serve requests.
This m... | python | def connect(
self, host: str = '127.0.0.1', port: int = 7497,
clientId: int = 1, timeout: float = 2):
"""
Connect to a running TWS or IB gateway application.
After the connection is made the client is fully synchronized
and ready to serve requests.
This m... | [
"def",
"connect",
"(",
"self",
",",
"host",
":",
"str",
"=",
"'127.0.0.1'",
",",
"port",
":",
"int",
"=",
"7497",
",",
"clientId",
":",
"int",
"=",
"1",
",",
"timeout",
":",
"float",
"=",
"2",
")",
":",
"return",
"self",
".",
"_run",
"(",
"self",... | Connect to a running TWS or IB gateway application.
After the connection is made the client is fully synchronized
and ready to serve requests.
This method is blocking.
Args:
host: Host name or IP address.
port: Port number.
clientId: ID number to use... | [
"Connect",
"to",
"a",
"running",
"TWS",
"or",
"IB",
"gateway",
"application",
".",
"After",
"the",
"connection",
"is",
"made",
"the",
"client",
"is",
"fully",
"synchronized",
"and",
"ready",
"to",
"serve",
"requests",
"."
] | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L208-L228 | train | Connects to a running TWS or IB gateway application. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.disconnect | def disconnect(self):
"""
Disconnect from a TWS or IB gateway application.
This will clear all session state.
"""
if not self.client.isConnected():
return
stats = self.client.connectionStats()
self._logger.info(
f'Disconnecting from {self.c... | python | def disconnect(self):
"""
Disconnect from a TWS or IB gateway application.
This will clear all session state.
"""
if not self.client.isConnected():
return
stats = self.client.connectionStats()
self._logger.info(
f'Disconnecting from {self.c... | [
"def",
"disconnect",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"client",
".",
"isConnected",
"(",
")",
":",
"return",
"stats",
"=",
"self",
".",
"client",
".",
"connectionStats",
"(",
")",
"self",
".",
"_logger",
".",
"info",
"(",
"f'Disconnecti... | Disconnect from a TWS or IB gateway application.
This will clear all session state. | [
"Disconnect",
"from",
"a",
"TWS",
"or",
"IB",
"gateway",
"application",
".",
"This",
"will",
"clear",
"all",
"session",
"state",
"."
] | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L230-L245 | train | Disconnect from a TWS or IB gateway application. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.waitOnUpdate | def waitOnUpdate(self, timeout: float = 0) -> bool:
"""
Wait on any new update to arrive from the network.
Args:
timeout: Maximum time in seconds to wait.
If 0 then no timeout is used.
.. note::
A loop with ``waitOnUpdate`` should not be used to ... | python | def waitOnUpdate(self, timeout: float = 0) -> bool:
"""
Wait on any new update to arrive from the network.
Args:
timeout: Maximum time in seconds to wait.
If 0 then no timeout is used.
.. note::
A loop with ``waitOnUpdate`` should not be used to ... | [
"def",
"waitOnUpdate",
"(",
"self",
",",
"timeout",
":",
"float",
"=",
"0",
")",
"->",
"bool",
":",
"if",
"timeout",
":",
"with",
"suppress",
"(",
"asyncio",
".",
"TimeoutError",
")",
":",
"util",
".",
"run",
"(",
"asyncio",
".",
"wait_for",
"(",
"se... | Wait on any new update to arrive from the network.
Args:
timeout: Maximum time in seconds to wait.
If 0 then no timeout is used.
.. note::
A loop with ``waitOnUpdate`` should not be used to harvest
tick data from tickers, since some ticks can go miss... | [
"Wait",
"on",
"any",
"new",
"update",
"to",
"arrive",
"from",
"the",
"network",
"."
] | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L263-L283 | train | Wait on any new update to arrive from the network. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.loopUntil | def loopUntil(
self, condition=None, timeout: float = 0) -> Iterator[object]:
"""
Iterate until condition is met, with optional timeout in seconds.
The yielded value is that of the condition or False when timed out.
Args:
condition: Predicate function that is tes... | python | def loopUntil(
self, condition=None, timeout: float = 0) -> Iterator[object]:
"""
Iterate until condition is met, with optional timeout in seconds.
The yielded value is that of the condition or False when timed out.
Args:
condition: Predicate function that is tes... | [
"def",
"loopUntil",
"(",
"self",
",",
"condition",
"=",
"None",
",",
"timeout",
":",
"float",
"=",
"0",
")",
"->",
"Iterator",
"[",
"object",
"]",
":",
"endTime",
"=",
"time",
".",
"time",
"(",
")",
"+",
"timeout",
"while",
"True",
":",
"test",
"="... | Iterate until condition is met, with optional timeout in seconds.
The yielded value is that of the condition or False when timed out.
Args:
condition: Predicate function that is tested after every network
update.
timeout: Maximum time in seconds to wait.
... | [
"Iterate",
"until",
"condition",
"is",
"met",
"with",
"optional",
"timeout",
"in",
"seconds",
".",
"The",
"yielded",
"value",
"is",
"that",
"of",
"the",
"condition",
"or",
"False",
"when",
"timed",
"out",
"."
] | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L285-L308 | train | Iterate until condition is met. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.accountValues | def accountValues(self, account: str = '') -> List[AccountValue]:
"""
List of account values for the given account,
or of all accounts if account is left blank.
Args:
account: If specified, filter for this account name.
"""
if account:
return [v f... | python | def accountValues(self, account: str = '') -> List[AccountValue]:
"""
List of account values for the given account,
or of all accounts if account is left blank.
Args:
account: If specified, filter for this account name.
"""
if account:
return [v f... | [
"def",
"accountValues",
"(",
"self",
",",
"account",
":",
"str",
"=",
"''",
")",
"->",
"List",
"[",
"AccountValue",
"]",
":",
"if",
"account",
":",
"return",
"[",
"v",
"for",
"v",
"in",
"self",
".",
"wrapper",
".",
"accountValues",
".",
"values",
"("... | List of account values for the given account,
or of all accounts if account is left blank.
Args:
account: If specified, filter for this account name. | [
"List",
"of",
"account",
"values",
"for",
"the",
"given",
"account",
"or",
"of",
"all",
"accounts",
"if",
"account",
"is",
"left",
"blank",
"."
] | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L329-L341 | train | Returns a list of account values for the given account. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.accountSummary | def accountSummary(self, account: str = '') -> List[AccountValue]:
"""
List of account values for the given account,
or of all accounts if account is left blank.
This method is blocking on first run, non-blocking after that.
Args:
account: If specified, filter for t... | python | def accountSummary(self, account: str = '') -> List[AccountValue]:
"""
List of account values for the given account,
or of all accounts if account is left blank.
This method is blocking on first run, non-blocking after that.
Args:
account: If specified, filter for t... | [
"def",
"accountSummary",
"(",
"self",
",",
"account",
":",
"str",
"=",
"''",
")",
"->",
"List",
"[",
"AccountValue",
"]",
":",
"if",
"not",
"self",
".",
"wrapper",
".",
"acctSummary",
":",
"# loaded on demand since it takes ca. 250 ms",
"self",
".",
"reqAccoun... | List of account values for the given account,
or of all accounts if account is left blank.
This method is blocking on first run, non-blocking after that.
Args:
account: If specified, filter for this account name. | [
"List",
"of",
"account",
"values",
"for",
"the",
"given",
"account",
"or",
"of",
"all",
"accounts",
"if",
"account",
"is",
"left",
"blank",
"."
] | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L343-L360 | train | Returns a list of account values for the given account. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.portfolio | def portfolio(self) -> List[PortfolioItem]:
"""
List of portfolio items of the default account.
"""
account = self.wrapper.accounts[0]
return [v for v in self.wrapper.portfolio[account].values()] | python | def portfolio(self) -> List[PortfolioItem]:
"""
List of portfolio items of the default account.
"""
account = self.wrapper.accounts[0]
return [v for v in self.wrapper.portfolio[account].values()] | [
"def",
"portfolio",
"(",
"self",
")",
"->",
"List",
"[",
"PortfolioItem",
"]",
":",
"account",
"=",
"self",
".",
"wrapper",
".",
"accounts",
"[",
"0",
"]",
"return",
"[",
"v",
"for",
"v",
"in",
"self",
".",
"wrapper",
".",
"portfolio",
"[",
"account"... | List of portfolio items of the default account. | [
"List",
"of",
"portfolio",
"items",
"of",
"the",
"default",
"account",
"."
] | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L362-L367 | train | Returns a list of portfolio items of the default account. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.positions | def positions(self, account: str = '') -> List[Position]:
"""
List of positions for the given account,
or of all accounts if account is left blank.
Args:
account: If specified, filter for this account name.
"""
if account:
return list(self.wrapper... | python | def positions(self, account: str = '') -> List[Position]:
"""
List of positions for the given account,
or of all accounts if account is left blank.
Args:
account: If specified, filter for this account name.
"""
if account:
return list(self.wrapper... | [
"def",
"positions",
"(",
"self",
",",
"account",
":",
"str",
"=",
"''",
")",
"->",
"List",
"[",
"Position",
"]",
":",
"if",
"account",
":",
"return",
"list",
"(",
"self",
".",
"wrapper",
".",
"positions",
"[",
"account",
"]",
".",
"values",
"(",
")... | List of positions for the given account,
or of all accounts if account is left blank.
Args:
account: If specified, filter for this account name. | [
"List",
"of",
"positions",
"for",
"the",
"given",
"account",
"or",
"of",
"all",
"accounts",
"if",
"account",
"is",
"left",
"blank",
"."
] | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L369-L381 | train | Returns a list of positions for the given account. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.pnl | def pnl(self, account='', modelCode='') -> List[PnL]:
"""
List of subscribed :class:`.PnL` objects (profit and loss),
optionally filtered by account and/or modelCode.
The :class:`.PnL` objects are kept live updated.
Args:
account: If specified, filter for this accou... | python | def pnl(self, account='', modelCode='') -> List[PnL]:
"""
List of subscribed :class:`.PnL` objects (profit and loss),
optionally filtered by account and/or modelCode.
The :class:`.PnL` objects are kept live updated.
Args:
account: If specified, filter for this accou... | [
"def",
"pnl",
"(",
"self",
",",
"account",
"=",
"''",
",",
"modelCode",
"=",
"''",
")",
"->",
"List",
"[",
"PnL",
"]",
":",
"return",
"[",
"v",
"for",
"v",
"in",
"self",
".",
"wrapper",
".",
"pnls",
".",
"values",
"(",
")",
"if",
"(",
"not",
... | List of subscribed :class:`.PnL` objects (profit and loss),
optionally filtered by account and/or modelCode.
The :class:`.PnL` objects are kept live updated.
Args:
account: If specified, filter for this account name.
modelCode: If specified, filter for this account mode... | [
"List",
"of",
"subscribed",
":",
"class",
":",
".",
"PnL",
"objects",
"(",
"profit",
"and",
"loss",
")",
"optionally",
"filtered",
"by",
"account",
"and",
"/",
"or",
"modelCode",
"."
] | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L383-L396 | train | Returns a list of all PnL objects subscribed to the given account and modelCode. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.pnlSingle | def pnlSingle(
self, account: str = '', modelCode: str = '',
conId: int = 0) -> List[PnLSingle]:
"""
List of subscribed :class:`.PnLSingle` objects (profit and loss for
single positions).
The :class:`.PnLSingle` objects are kept live updated.
Args:
... | python | def pnlSingle(
self, account: str = '', modelCode: str = '',
conId: int = 0) -> List[PnLSingle]:
"""
List of subscribed :class:`.PnLSingle` objects (profit and loss for
single positions).
The :class:`.PnLSingle` objects are kept live updated.
Args:
... | [
"def",
"pnlSingle",
"(",
"self",
",",
"account",
":",
"str",
"=",
"''",
",",
"modelCode",
":",
"str",
"=",
"''",
",",
"conId",
":",
"int",
"=",
"0",
")",
"->",
"List",
"[",
"PnLSingle",
"]",
":",
"return",
"[",
"v",
"for",
"v",
"in",
"self",
".... | List of subscribed :class:`.PnLSingle` objects (profit and loss for
single positions).
The :class:`.PnLSingle` objects are kept live updated.
Args:
account: If specified, filter for this account name.
modelCode: If specified, filter for this account model.
c... | [
"List",
"of",
"subscribed",
":",
"class",
":",
".",
"PnLSingle",
"objects",
"(",
"profit",
"and",
"loss",
"for",
"single",
"positions",
")",
"."
] | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L398-L415 | train | Returns a list of all single PnLSingles subscribed to the given account. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.openTrades | def openTrades(self) -> List[Trade]:
"""
List of all open order trades.
"""
return [v for v in self.wrapper.trades.values()
if v.orderStatus.status not in OrderStatus.DoneStates] | python | def openTrades(self) -> List[Trade]:
"""
List of all open order trades.
"""
return [v for v in self.wrapper.trades.values()
if v.orderStatus.status not in OrderStatus.DoneStates] | [
"def",
"openTrades",
"(",
"self",
")",
"->",
"List",
"[",
"Trade",
"]",
":",
"return",
"[",
"v",
"for",
"v",
"in",
"self",
".",
"wrapper",
".",
"trades",
".",
"values",
"(",
")",
"if",
"v",
".",
"orderStatus",
".",
"status",
"not",
"in",
"OrderStat... | List of all open order trades. | [
"List",
"of",
"all",
"open",
"order",
"trades",
"."
] | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L423-L428 | train | List of all open order trades. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.orders | def orders(self) -> List[Order]:
"""
List of all orders from this session.
"""
return list(
trade.order for trade in self.wrapper.trades.values()) | python | def orders(self) -> List[Order]:
"""
List of all orders from this session.
"""
return list(
trade.order for trade in self.wrapper.trades.values()) | [
"def",
"orders",
"(",
"self",
")",
"->",
"List",
"[",
"Order",
"]",
":",
"return",
"list",
"(",
"trade",
".",
"order",
"for",
"trade",
"in",
"self",
".",
"wrapper",
".",
"trades",
".",
"values",
"(",
")",
")"
] | List of all orders from this session. | [
"List",
"of",
"all",
"orders",
"from",
"this",
"session",
"."
] | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L430-L435 | train | List of all orders from this session. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.openOrders | def openOrders(self) -> List[Order]:
"""
List of all open orders.
"""
return [trade.order for trade in self.wrapper.trades.values()
if trade.orderStatus.status not in OrderStatus.DoneStates] | python | def openOrders(self) -> List[Order]:
"""
List of all open orders.
"""
return [trade.order for trade in self.wrapper.trades.values()
if trade.orderStatus.status not in OrderStatus.DoneStates] | [
"def",
"openOrders",
"(",
"self",
")",
"->",
"List",
"[",
"Order",
"]",
":",
"return",
"[",
"trade",
".",
"order",
"for",
"trade",
"in",
"self",
".",
"wrapper",
".",
"trades",
".",
"values",
"(",
")",
"if",
"trade",
".",
"orderStatus",
".",
"status",... | List of all open orders. | [
"List",
"of",
"all",
"open",
"orders",
"."
] | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L437-L442 | train | List of all open orders. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.executions | def executions(self) -> List[Execution]:
"""
List of all executions from this session.
"""
return list(fill.execution for fill in self.wrapper.fills.values()) | python | def executions(self) -> List[Execution]:
"""
List of all executions from this session.
"""
return list(fill.execution for fill in self.wrapper.fills.values()) | [
"def",
"executions",
"(",
"self",
")",
"->",
"List",
"[",
"Execution",
"]",
":",
"return",
"list",
"(",
"fill",
".",
"execution",
"for",
"fill",
"in",
"self",
".",
"wrapper",
".",
"fills",
".",
"values",
"(",
")",
")"
] | List of all executions from this session. | [
"List",
"of",
"all",
"executions",
"from",
"this",
"session",
"."
] | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L450-L454 | train | List of all executions from this session. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.ticker | def ticker(self, contract: Contract) -> Ticker:
"""
Get ticker of the given contract. It must have been requested before
with reqMktData with the same contract object. The ticker may not be
ready yet if called directly after :meth:`.reqMktData`.
Args:
contract: Contr... | python | def ticker(self, contract: Contract) -> Ticker:
"""
Get ticker of the given contract. It must have been requested before
with reqMktData with the same contract object. The ticker may not be
ready yet if called directly after :meth:`.reqMktData`.
Args:
contract: Contr... | [
"def",
"ticker",
"(",
"self",
",",
"contract",
":",
"Contract",
")",
"->",
"Ticker",
":",
"return",
"self",
".",
"wrapper",
".",
"tickers",
".",
"get",
"(",
"id",
"(",
"contract",
")",
")"
] | Get ticker of the given contract. It must have been requested before
with reqMktData with the same contract object. The ticker may not be
ready yet if called directly after :meth:`.reqMktData`.
Args:
contract: Contract to get ticker for. | [
"Get",
"ticker",
"of",
"the",
"given",
"contract",
".",
"It",
"must",
"have",
"been",
"requested",
"before",
"with",
"reqMktData",
"with",
"the",
"same",
"contract",
"object",
".",
"The",
"ticker",
"may",
"not",
"be",
"ready",
"yet",
"if",
"called",
"direc... | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L456-L465 | train | Get the ticker for the given contract. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.reqTickers | def reqTickers(
self, *contracts: List[Contract],
regulatorySnapshot: bool = False) -> List[Ticker]:
"""
Request and return a list of snapshot tickers.
The list is returned when all tickers are ready.
This method is blocking.
Args:
contracts:... | python | def reqTickers(
self, *contracts: List[Contract],
regulatorySnapshot: bool = False) -> List[Ticker]:
"""
Request and return a list of snapshot tickers.
The list is returned when all tickers are ready.
This method is blocking.
Args:
contracts:... | [
"def",
"reqTickers",
"(",
"self",
",",
"*",
"contracts",
":",
"List",
"[",
"Contract",
"]",
",",
"regulatorySnapshot",
":",
"bool",
"=",
"False",
")",
"->",
"List",
"[",
"Ticker",
"]",
":",
"return",
"self",
".",
"_run",
"(",
"self",
".",
"reqTickersAs... | Request and return a list of snapshot tickers.
The list is returned when all tickers are ready.
This method is blocking.
Args:
contracts: Contracts to get tickers for.
regulatorySnapshot: Request NBBO snapshots (may incur a fee). | [
"Request",
"and",
"return",
"a",
"list",
"of",
"snapshot",
"tickers",
".",
"The",
"list",
"is",
"returned",
"when",
"all",
"tickers",
"are",
"ready",
"."
] | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L499-L514 | train | Request and return a list of snapshot tickers. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.qualifyContracts | def qualifyContracts(self, *contracts: List[Contract]) -> List[Contract]:
"""
Fully qualify the given contracts in-place. This will fill in
the missing fields in the contract, especially the conId.
Returns a list of contracts that have been successfully qualified.
This method i... | python | def qualifyContracts(self, *contracts: List[Contract]) -> List[Contract]:
"""
Fully qualify the given contracts in-place. This will fill in
the missing fields in the contract, especially the conId.
Returns a list of contracts that have been successfully qualified.
This method i... | [
"def",
"qualifyContracts",
"(",
"self",
",",
"*",
"contracts",
":",
"List",
"[",
"Contract",
"]",
")",
"->",
"List",
"[",
"Contract",
"]",
":",
"return",
"self",
".",
"_run",
"(",
"self",
".",
"qualifyContractsAsync",
"(",
"*",
"contracts",
")",
")"
] | Fully qualify the given contracts in-place. This will fill in
the missing fields in the contract, especially the conId.
Returns a list of contracts that have been successfully qualified.
This method is blocking.
Args:
contracts: Contracts to qualify. | [
"Fully",
"qualify",
"the",
"given",
"contracts",
"in",
"-",
"place",
".",
"This",
"will",
"fill",
"in",
"the",
"missing",
"fields",
"in",
"the",
"contract",
"especially",
"the",
"conId",
"."
] | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L516-L528 | train | Fully qualify the given contracts in - place. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.bracketOrder | def bracketOrder(
self, action: str, quantity: float,
limitPrice: float, takeProfitPrice: float,
stopLossPrice: float, **kwargs) -> BracketOrder:
"""
Create a limit order that is bracketed by a take-profit order and
a stop-loss order. Submit the bracket like:
... | python | def bracketOrder(
self, action: str, quantity: float,
limitPrice: float, takeProfitPrice: float,
stopLossPrice: float, **kwargs) -> BracketOrder:
"""
Create a limit order that is bracketed by a take-profit order and
a stop-loss order. Submit the bracket like:
... | [
"def",
"bracketOrder",
"(",
"self",
",",
"action",
":",
"str",
",",
"quantity",
":",
"float",
",",
"limitPrice",
":",
"float",
",",
"takeProfitPrice",
":",
"float",
",",
"stopLossPrice",
":",
"float",
",",
"*",
"*",
"kwargs",
")",
"->",
"BracketOrder",
"... | Create a limit order that is bracketed by a take-profit order and
a stop-loss order. Submit the bracket like:
.. code-block:: python
for o in bracket:
ib.placeOrder(contract, o)
https://interactivebrokers.github.io/tws-api/bracket_order.html
Args:
... | [
"Create",
"a",
"limit",
"order",
"that",
"is",
"bracketed",
"by",
"a",
"take",
"-",
"profit",
"order",
"and",
"a",
"stop",
"-",
"loss",
"order",
".",
"Submit",
"the",
"bracket",
"like",
":"
] | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L530-L571 | train | Creates a bracket order that is bracketed by a take - profit order and a stop - loss order. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.oneCancelsAll | def oneCancelsAll(
orders: List[Order], ocaGroup: str, ocaType: int) -> List[Order]:
"""
Place the trades in the same One Cancels All (OCA) group.
https://interactivebrokers.github.io/tws-api/oca.html
Args:
orders: The orders that are to be placed together.
... | python | def oneCancelsAll(
orders: List[Order], ocaGroup: str, ocaType: int) -> List[Order]:
"""
Place the trades in the same One Cancels All (OCA) group.
https://interactivebrokers.github.io/tws-api/oca.html
Args:
orders: The orders that are to be placed together.
... | [
"def",
"oneCancelsAll",
"(",
"orders",
":",
"List",
"[",
"Order",
"]",
",",
"ocaGroup",
":",
"str",
",",
"ocaType",
":",
"int",
")",
"->",
"List",
"[",
"Order",
"]",
":",
"for",
"o",
"in",
"orders",
":",
"o",
".",
"ocaGroup",
"=",
"ocaGroup",
"o",
... | Place the trades in the same One Cancels All (OCA) group.
https://interactivebrokers.github.io/tws-api/oca.html
Args:
orders: The orders that are to be placed together. | [
"Place",
"the",
"trades",
"in",
"the",
"same",
"One",
"Cancels",
"All",
"(",
"OCA",
")",
"group",
"."
] | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L574-L587 | train | Place the trades in the same One Cancels All ( OCA group. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.whatIfOrder | def whatIfOrder(self, contract: Contract, order: Order) -> OrderState:
"""
Retrieve commission and margin impact without actually
placing the order. The given order will not be modified in any way.
This method is blocking.
Args:
contract: Contract to test.
... | python | def whatIfOrder(self, contract: Contract, order: Order) -> OrderState:
"""
Retrieve commission and margin impact without actually
placing the order. The given order will not be modified in any way.
This method is blocking.
Args:
contract: Contract to test.
... | [
"def",
"whatIfOrder",
"(",
"self",
",",
"contract",
":",
"Contract",
",",
"order",
":",
"Order",
")",
"->",
"OrderState",
":",
"return",
"self",
".",
"_run",
"(",
"self",
".",
"whatIfOrderAsync",
"(",
"contract",
",",
"order",
")",
")"
] | Retrieve commission and margin impact without actually
placing the order. The given order will not be modified in any way.
This method is blocking.
Args:
contract: Contract to test.
order: Order to test. | [
"Retrieve",
"commission",
"and",
"margin",
"impact",
"without",
"actually",
"placing",
"the",
"order",
".",
"The",
"given",
"order",
"will",
"not",
"be",
"modified",
"in",
"any",
"way",
"."
] | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L589-L600 | train | Retrieve commission and margin impact without actually
placing the order. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.placeOrder | def placeOrder(self, contract: Contract, order: Order) -> Trade:
"""
Place a new order or modify an existing order.
Returns a Trade that is kept live updated with
status changes, fills, etc.
Args:
contract: Contract to use for order.
order: The order to b... | python | def placeOrder(self, contract: Contract, order: Order) -> Trade:
"""
Place a new order or modify an existing order.
Returns a Trade that is kept live updated with
status changes, fills, etc.
Args:
contract: Contract to use for order.
order: The order to b... | [
"def",
"placeOrder",
"(",
"self",
",",
"contract",
":",
"Contract",
",",
"order",
":",
"Order",
")",
"->",
"Trade",
":",
"orderId",
"=",
"order",
".",
"orderId",
"or",
"self",
".",
"client",
".",
"getReqId",
"(",
")",
"self",
".",
"client",
".",
"pla... | Place a new order or modify an existing order.
Returns a Trade that is kept live updated with
status changes, fills, etc.
Args:
contract: Contract to use for order.
order: The order to be placed. | [
"Place",
"a",
"new",
"order",
"or",
"modify",
"an",
"existing",
"order",
".",
"Returns",
"a",
"Trade",
"that",
"is",
"kept",
"live",
"updated",
"with",
"status",
"changes",
"fills",
"etc",
"."
] | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L602-L637 | train | Place a new order or modify an existing order. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.cancelOrder | def cancelOrder(self, order: Order) -> Trade:
"""
Cancel the order and return the Trade it belongs to.
Args:
order: The order to be canceled.
"""
self.client.cancelOrder(order.orderId)
now = datetime.datetime.now(datetime.timezone.utc)
key = self.wrap... | python | def cancelOrder(self, order: Order) -> Trade:
"""
Cancel the order and return the Trade it belongs to.
Args:
order: The order to be canceled.
"""
self.client.cancelOrder(order.orderId)
now = datetime.datetime.now(datetime.timezone.utc)
key = self.wrap... | [
"def",
"cancelOrder",
"(",
"self",
",",
"order",
":",
"Order",
")",
"->",
"Trade",
":",
"self",
".",
"client",
".",
"cancelOrder",
"(",
"order",
".",
"orderId",
")",
"now",
"=",
"datetime",
".",
"datetime",
".",
"now",
"(",
"datetime",
".",
"timezone",... | Cancel the order and return the Trade it belongs to.
Args:
order: The order to be canceled. | [
"Cancel",
"the",
"order",
"and",
"return",
"the",
"Trade",
"it",
"belongs",
"to",
"."
] | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L639-L671 | train | Cancels the order and returns the Trade it belongs to. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.reqAccountUpdatesMulti | def reqAccountUpdatesMulti(
self, account: str = '', modelCode: str = ''):
"""
It is recommended to use :meth:`.accountValues` instead.
Request account values of multiple accounts and keep updated.
This method is blocking.
Args:
account: If specified, f... | python | def reqAccountUpdatesMulti(
self, account: str = '', modelCode: str = ''):
"""
It is recommended to use :meth:`.accountValues` instead.
Request account values of multiple accounts and keep updated.
This method is blocking.
Args:
account: If specified, f... | [
"def",
"reqAccountUpdatesMulti",
"(",
"self",
",",
"account",
":",
"str",
"=",
"''",
",",
"modelCode",
":",
"str",
"=",
"''",
")",
":",
"self",
".",
"_run",
"(",
"self",
".",
"reqAccountUpdatesMultiAsync",
"(",
"account",
",",
"modelCode",
")",
")"
] | It is recommended to use :meth:`.accountValues` instead.
Request account values of multiple accounts and keep updated.
This method is blocking.
Args:
account: If specified, filter for this account name.
modelCode: If specified, filter for this account model. | [
"It",
"is",
"recommended",
"to",
"use",
":",
"meth",
":",
".",
"accountValues",
"instead",
"."
] | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L704-L717 | train | Request multiple account values of multiple accounts and keep updated. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
erdewit/ib_insync | ib_insync/ib.py | IB.reqExecutions | def reqExecutions(
self, execFilter: ExecutionFilter = None) -> List[Fill]:
"""
It is recommended to use :meth:`.fills` or
:meth:`.executions` instead.
Request and return a list a list of fills.
This method is blocking.
Args:
execFilter: If spe... | python | def reqExecutions(
self, execFilter: ExecutionFilter = None) -> List[Fill]:
"""
It is recommended to use :meth:`.fills` or
:meth:`.executions` instead.
Request and return a list a list of fills.
This method is blocking.
Args:
execFilter: If spe... | [
"def",
"reqExecutions",
"(",
"self",
",",
"execFilter",
":",
"ExecutionFilter",
"=",
"None",
")",
"->",
"List",
"[",
"Fill",
"]",
":",
"return",
"self",
".",
"_run",
"(",
"self",
".",
"reqExecutionsAsync",
"(",
"execFilter",
")",
")"
] | It is recommended to use :meth:`.fills` or
:meth:`.executions` instead.
Request and return a list a list of fills.
This method is blocking.
Args:
execFilter: If specified, return executions that match the filter. | [
"It",
"is",
"recommended",
"to",
"use",
":",
"meth",
":",
".",
"fills",
"or",
":",
"meth",
":",
".",
"executions",
"instead",
"."
] | d0646a482590f5cb7bfddbd1f0870f8c4bc1df80 | https://github.com/erdewit/ib_insync/blob/d0646a482590f5cb7bfddbd1f0870f8c4bc1df80/ib_insync/ib.py#L768-L781 | train | Request all executions of the specified object. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.