MCPcopy Create free account

hub / github.com/linkedin/greykite / functions

Functions2,034 in github.com/linkedin/greykite

↓ 5 callersFunctiondedup_holiday_dict
Removes duplicates from get_holidays output :param holidays_dict: dict(str, pd.DataFrame(EVENT_DF_DATE_COL, EVENT_DF_LABEL_COL)) dictiona
greykite/algo/forecast/silverkite/forecast_simple_silverkite_helper.py:77
↓ 5 callersMethoddescribe_time_col
Basic descriptive stats on the timeseries time column. Returns ------- time_stats: `dict` Dictionary with descrip
greykite/framework/input/univariate_time_series.py:263
↓ 5 callersMethoddescribe_value_col
Basic descriptive stats on the timeseries value column. Returns ------- value_stats : `dict` [`str`, `float`] Dic
greykite/framework/input/univariate_time_series.py:304
↓ 5 callersFunctionelementwise_absolute_percent_error
The absolute percent error between a single true and predicted value. Parameters ---------- true_val : float True value. pred
greykite/common/evaluation.py:754
↓ 5 callersFunctionelementwise_symmetric_absolute_percent_error
The symmetric absolute percent error between a single true and predicted value. Parameters ---------- true_val : float True value
greykite/common/evaluation.py:777
↓ 5 callersFunctionestimate_empirical_distribution
Estimates the empirical distribution for a given variable in the ``distribution_col`` of ``df``. The distribution is an approximated quantile
greykite/algo/uncertainty/conditional/estimate_distribution.py:27
↓ 5 callersMethodextract_forecasts
Extracts forecasts, upper and lower confidence interval for each individual config. This is saved as a ``pandas.DataFrame`` with the name
greykite/framework/benchmark/benchmark_class.py:168
↓ 5 callersMethodfit
Computes the column-wise anomaly scores, stored as ``score`` attribute. Parameters ---------- X : `pandas.DataFrame`
greykite/sklearn/transform/difference_based_outlier_transformer.py:112
↓ 5 callersMethodfit
Fits the partial regularized regression. Parameters ---------- x : `numpy.array` or `pandas.DataFrame` The design
greykite/algo/common/partial_regularize_regression.py:118
↓ 5 callersFunctionfit_forecast
( autoreg_dict=None, test_past_df=None, simulation_based=False)
greykite/tests/algo/forecast/silverkite/test_forecast_silverkite.py:1146
↓ 5 callersFunctionforecast_pipeline_rolling_evaluation
Runs ``forecast_pipeline`` on a rolling window basis. Parameters ---------- pipeline_params : `Dict` A dictionary containing the
greykite/framework/benchmark/benchmark_class_helper.py:37
↓ 5 callersFunctionget_color_palette
Returns ``num`` of distinct RGB colors. If ``num`` is less than or equal to the length of ``colors``, first ``num`` elements of ``colors`` are
greykite/common/viz/colors_utils.py:31
↓ 5 callersMethodget_data_names
Returns the names of the ``.csv`` and ``.csv.xz`` files in ``data_path``. Parameters ---------- data_path : `str`
greykite/common/data_loader.py:79
↓ 5 callersFunctionget_default_changepoints_dict
Get a changepoint dictionary based on the number of days in the observed timeseries and forecast horizon length in days to be provided as input to
greykite/algo/forecast/silverkite/forecast_silverkite_helper.py:68
↓ 5 callersFunctionget_extra_pred_cols
Gets extra predictor columns from the model components for :func:`~greykite.framework.templates.silverkite_templates.silverkite_template`. Pa
greykite/framework/templates/silverkite_template.py:50
↓ 5 callersMethodget_grouping_evaluation
Group-wise computation of forecasting error. Can be used to evaluate error/ aggregated value by a time feature, over time, or by a use
greykite/framework/output/univariate_forecast.py:273
↓ 5 callersMethodget_lagged_regressor_info
(self)
greykite/tests/framework/templates/test_base_template.py:64
↓ 5 callersMethodget_model_components_from_model_template
Gets the `ModelComponentsParam` class from model template. The template could be a name string, a `SimpleSilverkiteTemplateOptions` dataclass
greykite/framework/templates/simple_silverkite_template.py:1149
↓ 5 callersFunctionget_potential_changepoint_n
Gets the number of potential changepoints for changepoint detection. Parameters ---------- n_points : `int` The number of data po
greykite/algo/changepoint/adalasso/auto_changepoint_params.py:133
↓ 5 callersMethodget_regressor_cols
(self)
greykite/tests/framework/templates/test_base_template.py:61
↓ 5 callersMethodget_runtimes
Returns rolling average runtime in seconds for ``config_names``. Parameters ---------- config_names : `list` [`str`], default
greykite/framework/benchmark/benchmark_class.py:739
↓ 5 callersFunctiongroup_strs_with_regex_patterns
Given a list/tuple of strings (``strings``), it partitions it into various groups (sub-lists) as specified in a set of patterns given in ``regex_p
greykite/common/python_utils.py:793
↓ 5 callersFunctionis_dst_fcn
For a given timezone, it constructs a function which determines if a timestamp (`dt`) is inside the daylight saving period or not for a list o
greykite/common/features/timeseries_features.py:253
↓ 5 callersMethodload_parking
Loads the Hourly Parking dataset. This dataset contains occupancy rates (8:00 to 16:30) from 2016/10/04 to 2016/12/19 from car parks i
greykite/common/data_loader.py:223
↓ 5 callersFunctionmatthews_corrcoef
Computes the Matthews correlation coefficient for two arrays. The statistic is also known as the phi coefficient. The Matthews correlation coe
greykite/detection/common/ad_evaluation.py:203
↓ 5 callersFunctionplot_event_periods_multi
For a dataframe (``periods_df``) with rows denoting start and end of the periods, it plots the periods. If there extra segmentation is given (``gr
greykite/common/viz/timeseries_annotate.py:565
↓ 5 callersMethodplot_flexible_grouping_evaluation
Plots group-wise evaluation metrics. Whereas `~greykite.framework.output.univariate_forecast.UnivariateForecast.plot_grouping_evaluation`
greykite/framework/output/univariate_forecast.py:634
↓ 5 callersMethodplot_forecasts_by_step
Returns a ``forecast_step`` ahead rolling forecast plot. The plot consists one line for each valid. ``config_names``. If available, th
greykite/framework/benchmark/benchmark_class.py:215
↓ 5 callersFunctionplot_precision_recall_curve
Plots a Precision - Recall curve, where the x axis is recall and the y axis is precision. If ``grouping_col`` is None, it creates one Precision -
greykite/common/viz/timeseries_annotate.py:1085
↓ 5 callersMethodpredict
Predicts for new data. Parameters ---------- x : `numpy.array` or `pandas.DataFrame` The new data matrix.
greykite/algo/common/partial_regularize_regression.py:427
↓ 5 callersMethodpredict_n
This is the forecast function which can be used to forecast a number of periods into the future. It determines if the prediction shoul
greykite/algo/forecast/silverkite/forecast_silverkite.py:2389
↓ 5 callersFunctionprediction_band_width
Computes the prediction band width, expressed as a % relative to observed. Width is defined as average ratio of (upper-lower)/observed. :para
greykite/common/evaluation.py:577
↓ 5 callersFunctionquantile_loss_q
Returns quantile loss function for the specified quantile
greykite/common/evaluation.py:508
↓ 5 callersFunctionrange_based_precision_score
Compute a precision score for two classes, usually labeled 1 and 0 to denote an anomaly and not an anomaly. Both ``y_true`` and ``y_pred`` need to
greykite/detection/common/ad_evaluation.py:506
↓ 5 callersFunctionrange_based_recall_score
Compute a recall score for two classes, usually labeled 1 and 0 to denote an anomaly and not an anomaly. Both ``y_true`` and ``y_pred`` need to be
greykite/detection/common/ad_evaluation.py:586
↓ 5 callersFunctionsimplify_time_features
Simplifies a time feature predictor name. Eliminates the levels and unnecessary characters in a time feature predictor's name. If the origina
greykite/algo/common/col_name_utils.py:56
↓ 5 callersFunctionsoft_precision_score
Computes the soft precision score for two classes, usually labeled 1 and 0 to denote an anomaly and not an anomaly. soft_precision(window) is
greykite/detection/common/ad_evaluation.py:389
↓ 5 callersFunctionsoft_recall_score
Computes the soft recall score for two classes, usually labeled 1 and 0 to denote an anomaly/ alert and not an anomaly/ alert, for `y_true` and `y
greykite/detection/common/ad_evaluation.py:323
↓ 5 callersFunctionsplit_events_into_dictionaries
Splits pd.Dataframe(date, holiday) into separate dataframes, one per event Can be used to create the `daily_event_df_dict` parameter for `forecas
greykite/algo/forecast/silverkite/forecast_simple_silverkite_helper.py:93
↓ 5 callersMethodtransform
Replaces outliers with NaN. Parameters ---------- X : `pandas.DataFrame` Data to transform. e.g. each column is a
greykite/sklearn/transform/zscore_outlier_transformer.py:91
↓ 5 callersMethodtransform
Imputes missing values in input time series. Checks the % of data points that are null, and provides warning if it exceeds ``self.max
greykite/sklearn/transform/null_transformer.py:152
↓ 5 callersMethodtrim
This methods performs symmetric trimming from a given series `y` in the inputs. This means a percent of data from both sides of the
greykite/common/features/outlier.py:263
↓ 4 callersMethod__build_silverkite_features
This function adds the prediction model features in training and predict phase for ``self.forecast`` internal use but can be called ou
greykite/algo/forecast/silverkite/forecast_silverkite.py:2728
↓ 4 callersMethod_drop_incomplete_agg_and_aggregate_values
Drops incomplete periods from the begin and end, and gets aggregated values. Calls ``self._drop_incomplete_agg`` with locations 0 and -1, the
greykite/sklearn/estimator/multistage_forecast_estimator.py:607
↓ 4 callersMethod_get_non_time_cols
Gets the non time columns in a df. Non time columns do not have f"{self.time_col}__" in it or do not equal to self.time_col. Paramete
greykite/sklearn/estimator/multistage_forecast_estimator.py:440
↓ 4 callersMethod_populate_uncertainty_params
If any parameters of the ``uncertainty_dict`` for specific uncertainty methods need to be populated from the estimator, they should be added h
greykite/sklearn/estimator/base_forecast_estimator.py:368
↓ 4 callersMethod_score
Evaluates predicted target values for ``X`` relative to ``y_true``. Modified from `sklearn.metrics.scorer._PredictScorer` to work with
greykite/sklearn/sklearn_scorer.py:127
↓ 4 callersFunctionadd_event_window_multi
For a given dictionary of events data frames with a time_col and label_col it adds shifted events prior and after the given events For example
greykite/common/features/timeseries_features.py:1350
↓ 4 callersFunctionapply_func_to_columns
Returns a function that applies ``row_func`` to the selected ``cols``. Helper function for `~greykite.framework.output.univariate_forecast.Uni
greykite/common/python_utils.py:678
↓ 4 callersFunctionassert_default_forecast_config
Asserts for the default ForecastConfig values
greykite/tests/framework/templates/test_forecast_config.py:52
↓ 4 callersMethodautocomplete_map_func_dict
Sweeps through ``map_func_dict``, converting values that are `~greykite.common.evaluation.ElementwiseEvaluationMetricEnum` member name
greykite/framework/output/univariate_forecast.py:415
↓ 4 callersMethodautocomplete_metric_dict
Sweeps through ``metric_dict``, converting members of ``enum_class`` to their corresponding evaluation function. For example::
greykite/framework/benchmark/benchmark_class.py:854
↓ 4 callersFunctioncalc_pred_coverage
Calculates the prediction coverages: prediction band width, prediction band coverage etc. :param observed: pd.Series or np.array, numeric, ob
greykite/common/evaluation.py:650
↓ 4 callersFunctionconstant_col_finder
Finds constant columns in x. A column is considered as a constant column if all rows have the same value and the value is not zero. Para
greykite/algo/common/partial_regularize_regression.py:40
↓ 4 callersFunctioncopy
(obj)
greykite/tests/framework/benchmark/test_benchmark_class.py:251
↓ 4 callersFunctioncreate_pred_category
Creates a dictionary of predictor categories. The keys are categories, and the values are the corresponding predictor names. For detail, see
greykite/algo/common/col_name_utils.py:220
↓ 4 callersMethoddetect
This is the main function to create dataframe with level shift regressor columns. It will detect the level shifts, return a dataframe
greykite/algo/changepoint/shift_detection/shift_detector.py:170
↓ 4 callersFunctionestimate_trend_with_detected_changepoints
Estimates the trend effect with detected change points. Parameters ---------- df : `pandas.DataFrame` The data df. time_col :
greykite/algo/changepoint/adalasso/changepoints_utils.py:1107
↓ 4 callersFunctionfind_missing_dates
Identifies any gaps in pandas Series containing timestamps Timestamps are assumed to be in sorted order :return: pd.DataFrame with dates of th
greykite/common/time_properties.py:133
↓ 4 callersMethodfit
Updates `self.impute_params`. Parameters ---------- X : `pandas.DataFrame` Training input data. e.g. each column
greykite/sklearn/transform/null_transformer.py:127
↓ 4 callersMethodfit
Fits the uncertainty model. Parameters ---------- train_df : `pandas.DataFrame` The data used to fit the uncertai
greykite/sklearn/uncertainty/quantile_regression_uncertainty_model.py:289
↓ 4 callersFunctionformat_summary_df
Formats the summary df for printing. Rounds numbers so they look good. Formats p-values to make them display the same way as the lm function
greykite/algo/common/model_summary_utils.py:1537
↓ 4 callersFunctionfraction_within_bands
Computes the fraction of observed values between lower and upper. :param observed: pd.Series or np.array, numeric, observed values :param low
greykite/common/evaluation.py:515
↓ 4 callersFunctionfs_func
(df)
greykite/common/features/timeseries_features.py:1461
↓ 4 callersFunctiongen_sliced_df
generates a data frame which includes a response variable with column name "y", and an estimate of y with column name "y_hat". y is designed to be
greykite/common/testing_utils.py:435
↓ 4 callersMethodgenerate_daily_event_dict
Generates daily event dict for all holidays inferred. The daily event dict will contain: - Single events for every holiday or hol
greykite/algo/common/holiday_inferrer.py:834
↓ 4 callersFunctionget_auto_seasonality
Automatically infers the following seasonality Fourier series orders: - yearly seasonality - quarterly seasonality - monthly
greykite/algo/forecast/silverkite/auto_config.py:48
↓ 4 callersMethodget_grouping_evaluation
Group-wise computation of aggregated timeSeries value. Can be used to evaluate error/ aggregated value by a time feature, over time, o
greykite/framework/input/univariate_time_series.py:454
↓ 4 callersFunctionget_intercept_col_from_design_mat
Gets the explicit or implicit intercept column name from `patsy` design matrix. By default, `patsy` will make the design matrix always full rank.
greykite/algo/common/ml_models.py:71
↓ 4 callersMethodget_regressor_cols
Returns regressor column names. Implements the method in `~greykite.framework.templates.base_template.BaseTemplate`. The intersectio
greykite/framework/templates/silverkite_template.py:455
↓ 4 callersFunctionget_seasonality_changepoint_df_cols
Gets the seasonality change point feature df column names. Parameters ---------- df : `pandas.DataFrame` The dataframe used to bu
greykite/algo/changepoint/adalasso/changepoints_utils.py:1226
↓ 4 callersFunctionget_trend_changepoint_dates_from_cols
Gets the trend changepoint dates from trend changepoint column names. Parameters ---------- trend_cols : `list[`str`]` List of tr
greykite/algo/changepoint/adalasso/changepoints_utils.py:1281
↓ 4 callersFunctionget_trend_changes_from_adaptive_lasso
Parses the adaptive lasso estimator to get change point dates. The functions calls ``adaptive_lasso_cv`` to selected potential trend change point
greykite/algo/changepoint/adalasso/changepoints_utils.py:721
↓ 4 callersFunctiongrouping_evaluation
Groups ``df`` and evaluates a function on each group. The function takes a `pandas.DataFrame` and returns a scalar. Parameters ----------
greykite/common/viz/timeseries_plotting.py:799
↓ 4 callersMethodjoin_with_forecasts
Joins data with forecasts. This will be used both in training and prediction phases. Parameters ---------- forecast_df
greykite/detection/detector/forecast_based.py:100
↓ 4 callersMethodload_electricity
Loads the Hourly Electricity dataset. This dataset contains the hourly consumption (in Kilowatt) of 321 clients from 2012 to 2014 pub
greykite/common/data_loader.py:379
↓ 4 callersMethodload_parking_ts
Loads the Hourly Parking dataset. This dataset contains occupancy rates (8:00 to 16:30) from 2016/10/04 to 2016/12/19 from car parks
greykite/framework/benchmark/data_loader_ts.py:71
↓ 4 callersMethodload_sf_traffic
Loads the Hourly San Francisco Bay Area Traffic dataset. This dataset contains the road occupancy rates (between 0 and 1) measured by
greykite/common/data_loader.py:416
↓ 4 callersMethodload_solarpower
Loads the Hourly Solar Power dataset. This dataset contains the solar power production of an Australian wind farm from August 2019 to
greykite/common/data_loader.py:305
↓ 4 callersMethodload_windpower
Loads the Hourly Wind Power dataset. This dataset contains the wind power production of an Australian wind farm from August 2019 to J
greykite/common/data_loader.py:342
↓ 4 callersFunctionmake_scorer_df
Make a scorer from a performance metric or loss function. This factory function wraps scoring functions for use in GridSearchCV and cross_val
greykite/sklearn/sklearn_scorer.py:180
↓ 4 callersFunctionnormal_quantiles_df
Calculates normal quantiles for each row of ``df`` using available means (either given in ``mean_col`` or ``fixed_mean``) and standard deviati
greykite/algo/uncertainty/conditional/normal_quantiles.py:27
↓ 4 callersFunctionparams_component_breakdowns
Parameters for ``plot_components``
greykite/sklearn/estimator/testing_utils.py:117
↓ 4 callersMethodplot
Returns interactive plotly graph of the value against time. If anomaly info is provided, there is an option to show the anomaly adjustment.
greykite/framework/input/univariate_time_series.py:391
↓ 4 callersFunctionplot_dual_axis_figure
Generic function to plot a dual y-axis plot. The x-axis is specified by ``x_col``. The left and right y-axes are specified by ``y_left_col`` and `
greykite/common/viz/timeseries_plotting.py:1038
↓ 4 callersMethodplot_forecasts_by_config
Returns a rolling plot of the forecasts by ``config_name`` against ``TIME_COL``. The plot consists of one line for each available split. Some
greykite/framework/benchmark/benchmark_class.py:284
↓ 4 callersMethodplot_grouping_evaluation
Computes error by group and plots the result. Can be used to plot error by a time feature, over time, or by a user-provided column. E
greykite/framework/output/univariate_forecast.py:344
↓ 4 callersMethodplot_grouping_evaluation
Computes aggregated timeseries by group and plots the result. Can be used to plot aggregated timeseries by a time feature, over time,
greykite/framework/input/univariate_time_series.py:521
↓ 4 callersMethodplot_grouping_evaluation_metrics
Returns a line plot of the grouped evaluation values of ``metric_dict`` of ``config_names``. These values are grouped by the grouping method c
greykite/framework/benchmark/benchmark_class.py:646
↓ 4 callersFunctionplot_multivariate_grouped
Plots multiple lines against the same x-axis values. The lines can partially share the x-axis values. See parameter descriptions for a runnin
greykite/common/viz/timeseries_plotting.py:150
↓ 4 callersFunctionplot_univariate
Simple plot of univariate timeseries. Parameters ---------- df : `pandas.DataFrame` Data frame with ``x_col`` and ``y_col`` x
greykite/common/viz/timeseries_plotting.py:376
↓ 4 callersFunctionplt_compare_timeseries
Compare a collection by of timeseries (given in `df_dict`) by overlaying them in the specified period between ``start_time`` and ``end_t
greykite/common/viz/timeseries_plotting_mpl.py:37
↓ 4 callersFunctionrun_dummy_grid_search
Runs a pandas.DataFrame through hyperparameter_grid search with custom CV splits on a simple dataset to show that all the pieces fit together.
greykite/tests/framework/pipeline/test_utils.py:597
↓ 4 callersFunctionsimplify_event
Simplifies an event predictor name. Eliminates the levels and unnecessary characters in an event predictor's name. If the original name is
greykite/algo/common/col_name_utils.py:28
↓ 4 callersFunctionsoft_f1_score
Computes the soft F1 score for two classes, usually labeled 1 and 0 to denote an anomaly and not an anomaly. Soft F1 is simply calculated from
greykite/detection/common/ad_evaluation.py:457
↓ 4 callersFunctionsymmetric_mean_absolute_percent_error
Calculates symmetric mean absolute percentage error Note that we do not include a factor of 2 in the denominator, so the range is 0% to 100%.
greykite/common/evaluation.py:446
↓ 4 callersMethodto_dict
(self)
greykite/framework/templates/autogen/forecast_config.py:452
↓ 4 callersFunctiontrain_forecast_func
( df, value_col, time_col=None, forecast_horizon=1)
greykite/tests/algo/common/test_forecast_one_by_one.py:13
↓ 4 callersMethodtransform
Normalizes data using the specified scaling method. Parameters ---------- X : `pandas.DataFrame` Data to transfor
greykite/sklearn/transform/drop_degenerate_transformer.py:85
↓ 4 callersMethodtransform
(self, X)
greykite/sklearn/transform/column_selector.py:39
← previousnext →301–400 of 2,034, ranked by callers