MCPcopy Index your code

hub / github.com/linkedin/greykite / functions

Functions2,034 in github.com/linkedin/greykite

↓ 543 callersFunctionassert_equal
Generic equality function that raises an ``AssertionError`` if the objects are not equal. Notes ----- Works with pandas.DataFrame, pandas
greykite/common/python_utils.py:209
↓ 228 callersMethodget_metric_name
Returns the short name.
greykite/common/evaluation.py:1026
↓ 112 callersMethodapply
( self, *args, **kwargs)
greykite/detection/detector/reward.py:124
↓ 112 callersFunctionfrom_union
(fs, x)
greykite/framework/templates/autogen/forecast_config.py:38
↓ 96 callersFunctiongenerate_df_for_tests
Generates dataset for unit tests. :param freq: str pd.date_range freq parameter, e.g. H or D :param periods: int number of pe
greykite/common/testing_utils.py:48
↓ 90 callersMethodrun_forecast_config
Creates a forecast from input data and config. The result is also stored as ``self.forecast_result``. Parameters ----------
greykite/framework/templates/forecaster.py:349
↓ 85 callersFunctionlog_message
Adds a message to logger. Parameters ---------- message : `any` The message to be added to logger. level : `Enum` One
greykite/common/logging.py:113
↓ 74 callersMethodforecast
A function for forecasting. It captures growth, seasonality, holidays and other patterns. See "Capturing the time-dependence in the pr
greykite/algo/forecast/silverkite/forecast_silverkite.py:85
↓ 74 callersMethodpredict
(self, X, y=None)
greykite/tests/sklearn/estimator/test_base_forecast_estimator.py:74
↓ 68 callersFunctioncalc_pred_err
Calculates the basic error measures in `~greykite.common.evaluation.EvaluationMetricEnum` and returns them in a dictionary. Parameters
greykite/common/evaluation.py:359
↓ 66 callersMethodsplit
Generates indices to split data into training and test CV folds according to rolling window time series cross validation Parameters
greykite/sklearn/cross_validation.py:159
↓ 54 callersFunctiongenerate_df_with_reg_for_tests
Generates dataset for unit tests that includes regressor columns :param freq: str pd.date_range freq parameter, e.g. H or D :param per
greykite/common/testing_utils.py:211
↓ 54 callersMethodplot
Plots the predicted anomalies over the actual anomalies. Parameters ---------- phase : str, default ``PHASE_PREDICT``
greykite/detection/detector/detector.py:306
↓ 51 callersMethodget_metric_func
Returns the metric function.
greykite/common/evaluation.py:1018
↓ 46 callersMethodload_peyton_manning
Loads the Daily Peyton Manning dataset. This dataset contains log daily page views for the Wikipedia page for Peyton Manning. One of
greykite/common/data_loader.py:199
↓ 42 callersMethodapply_forecast_config_defaults
Applies the default Forecast Config values to the given config. If an expected attribute value is provided, the value is unchanged. Ot
greykite/framework/templates/forecast_config_defaults.py:229
↓ 42 callersMethodfind_trend_changepoints
Finds trend change points automatically by adaptive lasso. The algorithm does an aggregation with a user-defined frequency, defaults daily.
greykite/algo/changepoint/adalasso/changepoint_detector.py:141
↓ 42 callersFunctionforecast_pipeline
Computation pipeline for end-to-end forecasting. Trains a forecast model end-to-end: 1. checks input data 2. runs cross-validati
greykite/framework/pipeline/pipeline.py:249
↓ 41 callersMethodplot_quantiles_and_overlays
Plots mean, quantiles, and overlays by the requested grouping dimension. The grouping dimension goes on the x-axis, and one line is shown for
greykite/framework/input/univariate_time_series.py:912
↓ 38 callersFunctionsummarize_grid_search_results
Summarizes CV results for each grid search parameter combination. While ``grid_search.cv_results_`` could be imported into a `pandas.DataFram
greykite/framework/utils/result_summary.py:202
↓ 36 callersMethodpredict
Performs predictions using silverkite model. It determines if the prediction should be simulation-based or not and then predicts using
greykite/algo/forecast/silverkite/forecast_silverkite.py:1987
↓ 36 callersFunctionupdate_dictionary
Adds default key-value pairs to items in ``overwrite_dict``. Merges the items in ``default_dict`` and ``overwrite_dict``, preferring ``overwr
greykite/common/python_utils.py:39
↓ 34 callersMethodfit_transform
Fits all transformers, transforms the data and concatenates results. Modified from `sklearn.pipeline.FeatureUnion`. Parameters
greykite/sklearn/transform/pandas_feature_union.py:78
↓ 32 callersFunctioncheck_forecast_pipeline_result
Helper function that validates forecast_pipeline output. Raises an AssertionError is results do not match the expected values. Parameters
greykite/framework/utils/framework_testing_utils.py:201
↓ 32 callersMethodloads
Deserializes the output of the `dumps` method. Parameters ---------- serialized_dict: `dict` The output of the `d
greykite/detection/common/pickler.py:154
↓ 31 callersFunctionget_fourier_col_name
Returns column name corresponding to a particular fourier term, as returned by fourier_series_fcn :param k: int fourier term :param c
greykite/common/features/timeseries_features.py:1422
↓ 29 callersMethodfit
Fits the quantile regression model. Parameters ---------- X : `numpy.array`, `pandas.DataFrame` or `pandas.Series`
greykite/algo/common/l1_quantile_regression.py:327
↓ 29 callersFunctionpredict_ml
Returns predictions on new data using the machine-learning (ml) model fitted via ``fit_ml_model``. :param fut_df: `pd.DataFrame` Inpu
greykite/algo/common/ml_models.py:702
↓ 27 callersMethoddumps
Uses Depth First Search (DFS) to recursively serialize the input `obj`. For each object, the following happens: 1. If the `obj` is se
greykite/detection/common/pickler.py:79
↓ 27 callersFunctionget_canonical_data
Loads data to internal representation. Parses date column, sets timezone aware index. Checks for irregularities and raises an error if input i
greykite/common/time_properties.py:204
↓ 27 callersMethodload_data
Loads data to internal representation. Parses date column, sets timezone aware index. Checks for irregularities and raises an error if
greykite/framework/input/univariate_time_series.py:130
↓ 26 callersFunctionfrom_dict
(f: Callable[[Any], T], x: Any)
greykite/framework/templates/autogen/forecast_config.py:47
↓ 26 callersFunctionget_holidays
This function extracts a holiday data frame for the period of interest [year_start to year_end] for the given countries. This is done using th
greykite/common/features/timeseries_features.py:609
↓ 26 callersMethodget_metric_greater_is_better
Returns the greater_is_better boolean.
greykite/common/evaluation.py:1022
↓ 26 callersFunctionpartial_return
For a given function ``func`` which returns multiple outputs accessible by ``[]`` e.g. python list or dictionary, it construct a new function whic
greykite/detection/detector/ad_utils.py:35
↓ 25 callersMethodfit
( self, data)
greykite/tests/detection/detector/test_detector.py:64
↓ 25 callersFunctionplot_lines_markers
A lightweight, easy-to-use function to create a plotly figure of given - lines (curves) - markers (points) - filled bands (e.g. error ban
greykite/common/viz/timeseries_annotate.py:360
↓ 24 callersMethodfit
Fits the lag based forecast model. Parameters ---------- X: `pandas.DataFrame` Input timeseries, with timestamp c
greykite/sklearn/estimator/lag_based_estimator.py:155
↓ 24 callersMethodget_data_home
Returns the folder path ``data_dir/data_sub_dir``. If ``data_dir`` is None returns the internal data directory. By default the Greykit
greykite/common/data_loader.py:45
↓ 22 callersFunctionplot_multivariate
Plots one or more lines against the same x-axis values. Parameters ---------- df : `pandas.DataFrame` Data frame with ``x_col`` a
greykite/common/viz/timeseries_plotting.py:41
↓ 22 callersMethodpredict_n_no_sim
This is the forecast function which can be used to forecast. It accepts extra regressors (``extra_pred_cols``) originally in ``df`` vi
greykite/algo/forecast/silverkite/forecast_silverkite.py:1293
↓ 21 callersMethodfit
Pre-processing before fitting ``Silverkite`` forecast model. Parameters ---------- X: `pandas.DataFrame` Input ti
greykite/sklearn/estimator/base_silverkite_estimator.py:257
↓ 21 callersFunctionfit_model_via_design_matrix
Fits the predictive model and returns the prediction function. Parameters ---------- x_train : `numpy.array` The design matrix
greykite/algo/common/ml_models.py:204
↓ 21 callersFunctionget_distinct_colors
Gets ``num_colors`` most distinguishable colors. Uses color maps "tab10", "tab20" or "viridis" depending on the number of colors needed. S
greykite/common/viz/colors_utils.py:65
↓ 21 callersFunctionvalid_elements_for_evaluation
Keeps finite elements from reference_array, and corresponding elements in *arrays. Parameters ---------- reference_arrays : `list` [`nump
greykite/common/evaluation.py:74
↓ 20 callersFunctionget_default_origin_for_time_vars
Sets default value for origin_for_time_vars Parameters ---------- df : `pandas.DataFrame` Training data. A data frame which inclu
greykite/common/features/timeseries_features.py:64
↓ 20 callersMethodpredict
Creates forecast for the dates specified in ``X``. Parameters ---------- X: `pandas.DataFrame` Input timeseries w
greykite/sklearn/estimator/lag_based_estimator.py:208
↓ 20 callersMethodscore
Default scorer for the estimator. Returns error based on ``score_func``. Because this is often used as null model, it is more informative to r
greykite/sklearn/estimator/null_model.py:177
↓ 20 callersMethodsummary
Returns a summary of the fitted model.
greykite/detection/detector/detector.py:371
↓ 19 callersFunctionbuild_time_features_df
This function gets a datetime-like vector and creates new columns containing temporal features useful for time series analysis and forecasting e.g
greykite/common/features/timeseries_features.py:366
↓ 19 callersMethodconstants
Constants used by the template class. Includes the model templates and their default values.
greykite/framework/templates/simple_silverkite_template.py:621
↓ 19 callersMethodconvert_params
Converts parameters of :func:`~greykite.algo.forecast.silverkite.forecast_simple_silverkite` into those of :func:`~greykite.algo.forec
greykite/algo/forecast/silverkite/forecast_simple_silverkite.py:73
↓ 19 callersMethodfit
Fits the ``transform_matrix`` based on input data, constraint, and objective function. Sets the attributes between ``forecasts`` and ``object
greykite/algo/reconcile/convex/reconcile_forecasts.py:970
↓ 19 callersMethodplot_components
Plot the ``Prophet`` forecast components on the dataset passed to ``predict``. Will plot whichever are available of: trend, holidays,
greykite/sklearn/estimator/prophet_estimator.py:326
↓ 19 callersMethodpredict_no_sim
Performs predictions for the dates in ``fut_df``. If ``extra_pred_cols`` refers to a column in ``df``, either ``fut_df`` or ``new_exte
greykite/algo/forecast/silverkite/forecast_silverkite.py:1087
↓ 19 callersFunctionupdate_dictionaries
Adds default key-value pairs to items in ``overwrite_dicts``. Merges the items in ``default_dict`` and ``overwrite_dicts``, preferring ``over
greykite/common/python_utils.py:80
↓ 18 callersFunctionadjust_anomalous_data
This function takes: - a time series, in the form of a dataframe: ``df`` - the anomaly information, in the form of a dataframe: ``ano
greykite/common/features/adjust_anomalous_data.py:36
↓ 18 callersFunctiondump_obj
Uses DFS to recursively dump an object to pickle files. Originally intended for dumping the `~greykite.framework.pipeline.pipeline.ForecastRes
greykite/framework/templates/pickle_utils.py:60
↓ 18 callersFunctionflexible_grouping_evaluation
Flexible aggregation. Generates additional columns for evaluation via ``map_func_dict``, groups by ``groupby_col``, then aggregates according
greykite/common/viz/timeseries_plotting.py:838
↓ 18 callersFunctionget_changepoint_dates_from_changepoints_dict
Gets the changepoint dates from ``changepoints_dict`` Parameters ---------- changepoints_dict : `dict` or `None` The ``changepoin
greykite/common/features/timeseries_features.py:1304
↓ 18 callersMethodget_df
Returns a ``pandas.DataFrame`` containing the dataset from ``data_path/data_name``. The input data must be in ``.csv`` or ``.csv.xz`` format.
greykite/common/data_loader.py:174
↓ 18 callersFunctionget_dummy_pipeline
Returns a ``pipeline`` argument to ``forecast_pipeline`` that uses ``DummyEstimator`` to make it easy to unit test ``forecast_pipeline``.
greykite/tests/framework/pipeline/test_pipeline.py:81
↓ 18 callersMethodget_quantiles_and_overlays
Computes mean, quantiles, and overlays by the requested grouping dimension. Overlays are best explained in the plotting context. The grouping
greykite/framework/input/univariate_time_series.py:589
↓ 18 callersFunctionmock_pipeline
Create and returns custom pipeline parameters
greykite/framework/utils/framework_testing_utils.py:436
↓ 18 callersFunctionrecursive_rm_dir
Recursively removes dirs and files in ``dir_name``. This functions removes everything in ``dir_name`` that it has permission to remove. This
greykite/framework/templates/pickle_utils.py:32
↓ 17 callersFunctionadd_time_features_df
Adds a time feature data frame to a data frame by calling `~greykite.common.features.timeseries_features.build_time_features_df`. Parameters
greykite/common/features/timeseries_features.py:575
↓ 17 callersMethodfind_seasonality_changepoints
Finds the seasonality change points (defined as the time points where seasonality magnitude changes, i.e., the time series becomes "fatter" or
greykite/algo/changepoint/adalasso/changepoint_detector.py:569
↓ 17 callersFunctionfit_ml_model_with_evaluation
Fits prediction models to continuous response vector (y) and report results. Parameters ---------- df : `pandas.DataFrame` A
greykite/algo/common/ml_models.py:803
↓ 17 callersMethodget_n_splits
Returns the number of splitting iterations yielded by the cross-validator Parameters ---------- X : array-like, shape (n_samp
greykite/sklearn/cross_validation.py:225
↓ 17 callersMethodmake_future_dataframe
Extends the input data for prediction into the future. Includes the historical values (VALUE_COL) so this can be fed into a Pipeline
greykite/framework/input/univariate_time_series.py:319
↓ 17 callersFunctionround_numbers
Rounds numbers to significant figure. Rounds numbers to a specified significant figure, and uses string to format it. The number will be disp
greykite/algo/common/model_summary_utils.py:97
↓ 17 callersMethodset_params
Overrides the set_params method in `sklearn.base.BaseEstimator` to recognize estimator parameters. The set_params in sklearn requires
greykite/sklearn/estimator/one_by_one_estimator.py:201
↓ 16 callersFunctionadd_groupby_column
Extracts a column to group by from ``df``. Exactly one of ``groupby_time_feature``, ``groupby_sliding_window_size``, `groupby_custom_column`
greykite/common/viz/timeseries_plotting.py:713
↓ 16 callersMethodfit
Fits ``Silverkite`` forecast model. Parameters ---------- X: `pandas.DataFrame` Input timeseries, with timestamp
greykite/sklearn/estimator/silverkite_estimator.py:195
↓ 16 callersFunctionget_integer
Returns integer value from input, with basic validation Parameters ---------- val : `float` or None, default None Value to conver
greykite/common/python_utils.py:702
↓ 16 callersFunctionget_pattern_cols
Get columns names from a list that matches ``pos_pattern``, but does not match ``neg_pattern``. If a column name matches both ``pos_pattern``
greykite/common/python_utils.py:172
↓ 16 callersFunctionload_obj
Loads the pickled files which are pickled by `~greykite.framework.templates.pickle_utils.dump_obj`. Originally intended for loading the `~
greykite/framework/templates/pickle_utils.py:266
↓ 15 callersFunctionconvert_date_to_continuous_time
Converts date to continuous time. Each year is one unit. Parameters ---------- dt : datetime object the date to convert Retu
greykite/common/features/timeseries_features.py:41
↓ 15 callersMethodfinish_fit
Makes important values of ``self.model_dict`` conveniently accessible. To be called by subclasses at the end of their ``fit`` method. Sets
greykite/sklearn/estimator/base_silverkite_estimator.py:304
↓ 15 callersFunctionget_silverkite_uncertainty_dict
Returns an uncertainty_dict for `~greykite.algo.forecast.silverkite.forecast_silverkite.SilverkiteForecast.forecast` input parameter: uncertai
greykite/algo/forecast/silverkite/forecast_silverkite_helper.py:149
↓ 15 callersMethodpredict
Creates forecast for the dates specified in ``X``. Parameters ---------- X: `pandas.DataFrame` Input timeseries w
greykite/sklearn/estimator/multistage_forecast_estimator.py:307
↓ 14 callersMethodcheck_template_type
Checks the template name is valid and whether it is single or multi template. Raises an error if the template is not recognized. A va
greykite/framework/templates/simple_silverkite_template.py:979
↓ 14 callersFunctionconf_interval
A function to calculate confidence intervals (CI) for values given in ``distribution_col``. We allow for calculating as many quantiles as need
greykite/algo/uncertainty/conditional/conf_interval.py:40
↓ 14 callersMethodfit
Fits ``Silverkite`` forecast model. Parameters ---------- X: `pandas.DataFrame` Input timeseries, with timestamp
greykite/sklearn/estimator/simple_silverkite_estimator.py:215
↓ 14 callersMethodfit
Fits prophet model. Parameters ---------- X : `pandas.DataFrame` Input timeseries, with timestamp column,
greykite/sklearn/estimator/prophet_estimator.py:185
↓ 14 callersMethodfit
Fits ``MultistageForecast`` forecast model. Parameters ---------- X: `pandas.DataFrame` Input timeseries, with ti
greykite/sklearn/estimator/multistage_forecast_estimator.py:224
↓ 14 callersFunctionfunc
(a, b, c=1)
greykite/tests/common/test_python_utils.py:918
↓ 14 callersFunctiongenerate_test_data_for_fitting
Generate data for testing the fitting algorithm with different parameters e.g. linear and random forest. :param n: integer sample
greykite/tests/algo/common/test_ml_models.py:493
↓ 14 callersFunctionget_score_func_with_aggregation
Returns a score function that pre-aggregates inputs according to ``agg_func``, and filters out invalid true values before evaluation. This allows
greykite/framework/pipeline/utils.py:387
↓ 14 callersMethodinfer_holidays
Infers significant holidays and holiday configurations. The class works for daily and sub-daily data. Sub-daily data is aggregated in
greykite/algo/common/holiday_inferrer.py:170
↓ 14 callersMethodload_bikesharing
Loads the Hourly Bike Sharing Count dataset with possible aggregations. This dataset contains aggregated hourly count of the number of rented
greykite/common/data_loader.py:265
↓ 14 callersMethodpartition_fut_df
This function takes a dataframe ``fut_df`` which includes the timestamps to forecast and a ``trained_model`` returned by `~greykite.al
greykite/algo/forecast/silverkite/forecast_silverkite.py:2492
↓ 14 callersMethodpredict
Creates forecast for the dates specified in ``X``. Parameters ---------- X: `pandas.DataFrame` Input timeseries w
greykite/sklearn/estimator/base_silverkite_estimator.py:323
↓ 13 callersMethod_get_offset
Returns an offset to add to test set indices when creating CV splits CV splits are shifted so that the last test observation is the last point
greykite/sklearn/cross_validation.py:272
↓ 13 callersFunctionadaptive_lasso_cv
Performs the adaptive lasso cross-validation. Algorithm is based on a transformation of `sklearn.linear_model.LassoCV()`. If initial_coef i
greykite/algo/changepoint/adalasso/changepoints_utils.py:600
↓ 13 callersMethodget_hyperparameter_grid
Returns hyperparameter grid. Implements the method in `~greykite.framework.templates.base_template.BaseTemplate`. Uses ``self.time_p
greykite/framework/templates/prophet_template.py:501
↓ 13 callersFunctionget_simple_time_frequency_from_period
Returns SimpleTimeFrequencyEnum based on input data period :param period: float Period of each observation (i.e. average time between obse
greykite/common/time_properties_forecast.py:55
↓ 13 callersFunctionget_timestamp_ceil
Returns the smallest timestamp that is greater than or equal to `ts` and is also a multiple of the `freq`. Assume hourly frequency i.e. `freq`
greykite/detection/detector/ad_utils.py:446
↓ 13 callersFunctionmin_gap_in_seconds
Returns the smallest gap between observations in df[time_col]. Assumes df[time_col] is sorted in ascending order without duplicates. :param
greykite/common/time_properties.py:114
↓ 13 callersMethodplot_components
Class method to plot the components of a ``Silverkite`` model on datasets passed to either ``fit`` or ``predict``. Parameters
greykite/sklearn/estimator/base_silverkite_estimator.py:611
next →1–100 of 2,034, ranked by callers