Module Import alias Import alias Import alias identifier Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias identifier ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias Assign NameStore ListLoad Str Str Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad Slice NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Slice NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults ListLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore SubscriptLoad NameLoad Slice NameLoad If UnaryOpNot Call NameLoad body Raise Call NameLoad Str Assign NameStore Call Call NameLoad GeneratorExp Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad ListLoad NameLoad Dict NameLoad NameLoad NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd Call NameLoad NameLoad AttributeLoad NameLoad attr BoolOpOr CompareEq AttributeLoad NameLoad attr Num CompareIn Num AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Slice Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse For NameStore NameLoad body If BoolOpAnd Call NameLoad NameLoad AttributeLoad NameLoad attr BoolOpOr CompareEq AttributeLoad NameLoad attr Num CompareIn Num AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Slice Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse For NameStore NameLoad body Assign SubscriptStore NameLoad Slice Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd Call NameLoad NameLoad AttributeLoad NameLoad attr BoolOpOr CompareEq AttributeLoad NameLoad attr Num CompareIn Num AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Slice AttributeLoad NameLoad attr orelse For NameStore NameLoad body If BoolOpAnd Call NameLoad NameLoad AttributeLoad NameLoad attr BoolOpOr CompareEq AttributeLoad NameLoad attr Num CompareIn Num AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Slice AttributeLoad NameLoad attr orelse For NameStore NameLoad body Assign SubscriptStore NameLoad Slice AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body If Call NameLoad NameLoad TupleLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num If Call NameLoad ListComp Call NameLoad NameLoad AttributeLoad NameLoad attr comprehension NameStore TupleLoad NameLoad NameLoad NameLoad body Assign TupleStore NameStore NameStore NameStore TupleLoad ListLoad NameLoad ListLoad NameLoad ListLoad NameLoad If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If UnaryOpNot Call NameLoad ListComp Call NameLoad NameLoad TupleLoad NameLoad NameLoad comprehension NameStore TupleLoad NameLoad NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If NameLoad body If UnaryOpNot Call NameLoad body Raise Call NameLoad Str Assign NameStore ListComp Call NameLoad NameLoad NameLoad NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad keyword NameLoad comprehension TupleStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call Call NameLoad GeneratorExp Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Call NameLoad NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Str orelse Assign NameStore ListLoad Assign NameStore ListLoad For TupleStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad keyword SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list
N/A N/A copy N/A os N/A numpy np N/A pandas pd celery group celery_tasks celery_available celery_tasks featurize_ts_data featurize_data_task celery_tasks featurize_ts_file featurize_file_task N/A data_management N/A featurize_tools ft N/A time_series time_series TimeSeries N/A __all__ N/A load_and_store_feature_data featurize_data_files featurize_time_series load_and_store_feature_data N/A N/A features_path output_path first_N N/A None N/A N/A Read features from CSV file and save as an xarray.Dataset. N/A N/A targets meta_features N/A N/A data_management parse_headerfile features_path N/A meta_features N/A meta_features N/A first_N N/A N/A targets None N/A N/A targets N/A targets N/A first_N N/A meta_feature_dicts N/A N/A meta_features to_dict orient record N/A featureset N/A N/A ft assemble_featureset N/A targets meta_feature_dicts N/A N/A N/A featureset to_netcdf output_path N/A featureset N/A featurize_data_files N/A N/A ts_paths features_to_use output_path first_N custom_script_path N/A N/A None None None N/A N/A Generate features for labeled time series data.

    Each file should consist of one comma-separated line of per data point,
    where each line contains either pairs (time, value) or triples (time,
    value, error).

    If `output_path` is provided, features are saved as an xarray.Dataset in
    netCDF format.

    Parameters
    ----------
    ts_paths : str
        Path to netCDF files containing serialized TimeSeries objects.
    features_to_use : list of str, optional
        List of feature names to be generated. Defaults to an empty
        list, which will result in only meta_features features being stored.
    output_path : str, optional
        Path to which the output xarray.Dataset of feature data will be saved
        (if applicable).
    first_N : int, optional
        Integer indicating the maximum number of time series to featurize.
        Can be used to reduce the number of files for testing purposes. If
        `first_N` is None then all time series will be featurized.
    custom_script_path : str, optional
        Path to Python script containing function definitions for the
        generation of any custom features. Defaults to None.

    Returns
    -------
    xarray.Dataset
        Featureset with `data_vars` containing feature values, and `coords`
        containing filenames and targets (if applicable).
     N/A ts_paths N/A ts_paths N/A first_N N/A N/A N/A celery_available N/A N/A N/A RuntimeError Celery not available N/A celery_res N/A N/A group N/A N/A N/A featurize_file_task s ts_path features_to_use custom_script_path N/A ts_path ts_paths N/A res_list N/A N/A celery_res get N/A N/A fnames feature_dicts targets meta_feature_dicts N/A zip res_list N/A featureset N/A N/A ft assemble_featureset feature_dicts targets meta_feature_dicts fnames N/A output_path N/A N/A N/A N/A featureset to_netcdf output_path N/A featureset N/A featurize_time_series N/A N/A times values errors features_to_use targets meta_features labels custom_script_path custom_functions use_celery N/A None N/A None N/A None None None False N/A N/A Versatile feature generation function for one or more time series.

    For a single time series, inputs may have the form:

    - `times`:  (n,) array or (p, n) array (for p channels of measurement)
    - `values`: (n,) array or (p, n) array (for p channels of measurement)
    - `errors`: (n,) array or (p, n) array (for p channels of measurement)

    For multiple time series, inputs may have the form:

    - `times`: list of (n,) arrays, list of (p, n) arrays (for p channels of
      measurement), or list of lists of (n,) arrays (for
      multichannel data with different time values per channel)
    - `values`: list of (n,) arrays, list of (p, n) arrays (for p channels of
      measurement), or list of lists of (n,) arrays (for
      multichannel data with different time values per channel)
    - `errors`: list of (n,) arrays, list of (p, n) arrays (for p channels of
      measurement), or list of lists of (n,) arrays (for
      multichannel data with different time values per channel)

    In the case of multichannel measurements, each channel will be
    featurized separately, and the data variables of the output
    `xarray.Dataset` will be indexed by a `channel` coordinate.

    Parameters
    ----------
    times : array, list of array, or list of lists of array
        Array containing time values for a single time series, or a list of
        arrays each containing time values for a single time series, or a list
        of lists of arrays for multichannel data with different time values per
        channel
    values : array or list of array
        Array containing measurement values for a single time series, or a list
        of arrays each containing (possibly multivariate) measurement values
        for a single time series, or a list of lists of arrays for multichannel
        data with different time values per channel
    errors : array or list/tuple of array, optional
        Array containing measurement error values for a single time series, or
        a list of arrays each containing (possibly multivariate) measurement
        values for a single time series, or a list of lists of arrays for
        multichannel data with different time values per channel
    features_to_use : list of str, optional
        List of feature names to be generated. Defaults to an empty list, which
        will result in only meta_features features being stored.
    targets : str/float or array-like, optional
        Target or sequence of targets, one per time series (if applicable);
        will be stored in the `target` coordinate of the resulting
        `xarray.Dataset`.
    meta_features : dict/Pandas.Series or list of dicts/Pandas.DataFrame
        dict/Series (for a single time series) or DataFrame (for multiple time
        series) of metafeature information; features are added to the output
        featureset, and their values are consumable by custom feature scripts.
    labels : str or list of str, optional
        Label or list of labels for each time series, if applicable; will be
        stored in the `name` coordinate of the resulting `xarray.Dataset`.
    custom_script_path : str, optional
        Path to Python script containing function definitions for the
        generation of any custom features. Defaults to None.
    custom_functions : dict, optional
        Dictionary of custom feature functions to be evaluated for the given
        time series, or a dictionary representing a dask graph of function
        evaluations.  Dictionaries of functions should have keys `feature_name`
        and values functions that take arguments (t, m, e); in the case of a
        dask graph, these arrays should be referenced as 't', 'm', 'e',
        respectively, and any values with keys present in `features_to_use`
        will be computed.
    use_celery : bool, optional
        Boolean to control whether to distribute tasks to Celery workers (if
        Celery is available). Defaults to True.

    Returns
    -------
    xarray.Dataset
        Featureset with `data_vars` containing feature values and `coords`
        containing labels (`name`) and targets (`target`), if applicable.
     N/A N/A times None N/A N/A times N/A N/A copy deepcopy values N/A N/A N/A isinstance times N/A np ndarray N/A N/A N/A times ndim 1 N/A 1 N/A times shape N/A N/A N/A times N/A N/A N/A np linspace 0.0 N/A time_series DEFAULT_MAX_TIME N/A times size N/A N/A t times N/A N/A N/A N/A isinstance t N/A np ndarray N/A N/A N/A t ndim 1 N/A 1 N/A t shape N/A N/A N/A t N/A N/A N/A np linspace 0.0 N/A time_series DEFAULT_MAX_TIME N/A t size N/A N/A t_i t N/A N/A N/A t_i N/A N/A N/A np linspace 0.0 N/A time_series DEFAULT_MAX_TIME N/A t_i size N/A N/A errors None N/A N/A errors N/A N/A copy deepcopy values N/A N/A N/A isinstance errors N/A np ndarray N/A N/A N/A errors ndim 1 N/A 1 N/A errors shape N/A N/A N/A errors N/A N/A time_series DEFAULT_ERROR_VALUE N/A N/A e errors N/A N/A N/A N/A isinstance e N/A np ndarray N/A N/A N/A e ndim 1 N/A 1 N/A e shape N/A N/A N/A e N/A N/A time_series DEFAULT_ERROR_VALUE N/A N/A e_i e N/A N/A N/A e_i N/A N/A time_series DEFAULT_ERROR_VALUE N/A N/A labels None N/A N/A N/A isinstance times N/A list tuple N/A N/A labels N/A N/A np arange N/A len times N/A N/A labels N/A N/A np array N/A 0 N/A N/A all N/A N/A isinstance x N/A np ndarray N/A x N/A times values errors N/A N/A N/A times values errors N/A N/A times N/A values N/A errors N/A N/A isinstance meta_features N/A pd Series N/A N/A meta_features N/A N/A meta_features to_dict N/A N/A targets None N/A N/A targets N/A N/A pd Series targets index labels N/A N/A N/A all N/A N/A isinstance x N/A list tuple N/A x N/A times values errors N/A N/A N/A TypeError times, values, and errors have incompatible types N/A meta_features N/A N/A pd DataFrame meta_features index labels N/A use_celery N/A N/A N/A N/A celery_available N/A N/A N/A RuntimeError Celery unavailable; please check your Celery configuration or set `use_celery=False`. N/A all_time_series N/A N/A TimeSeries t m e N/A N/A meta_features loc N/A label name label N/A N/A t m e label N/A zip times values errors labels N/A celery_res N/A N/A group N/A N/A N/A featurize_data_task s ts features_to_use custom_script_path custom_functions N/A ts all_time_series N/A res_list N/A N/A celery_res get N/A N/A labels feature_dicts N/A zip res_list N/A N/A targets None N/A N/A targets N/A N/A targets loc N/A N/A list labels N/A meta_features N/A N/A meta_features loc N/A N/A list labels N/A meta_feature_dicts N/A N/A meta_features to_dict orient record N/A N/A feature_dicts N/A N/A meta_feature_dicts N/A N/A N/A t m e label N/A zip times values errors labels N/A N/A ts N/A TimeSeries t m e meta_features N/A N/A meta_features loc N/A label N/A feature_dict N/A N/A ft featurize_single_ts ts features_to_use custom_script_path custom_script_path custom_functions custom_functions N/A N/A N/A feature_dicts append feature_dict N/A N/A N/A meta_feature_dicts append N/A ts meta_features N/A N/A N/A ft assemble_featureset feature_dicts targets meta_feature_dicts labels N/A