AI Slop Code RIsk Monitor

facebookresearch/Kats

Kats, a kit to analyze time series data, a lightweight, easy-to-use, generalizable, and extendable framework to perform time series analysis, from understanding the key statistics and characteristics, detecting change points and anomalies, to forecasting future trends.

12.2 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for facebookresearch/Kats, a Python project with 6,496 GitHub stars. SynthScan examined 100,664 lines of code across 186 source files, recording 848 pattern matches distributed across 20 syntactic categories. The legacy adjusted pattern signal is 12.2 (Moderate pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

12.2
Adjusted Signal
12.2
Raw Pattern Score
100%
Time Factor
2026-10-01
Last Push
6.5K
Stars
Python
Language
100.7K
Lines of Code
186
Files
848
Pattern Hits
2026-10-12
Scan Date
0.42
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 30.8/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 607 finding(s).

Hallucinated Dependency & Supply Chain Risk 12.1/100 · LOW

Are imports declared and package/API names verified? 144 finding(s).

Agent Over-Engineering Ratio 28.0/100 · MEDIUM

Are wrappers, guards, and repeated structures necessary? 538 finding(s).

PR Review Velocity Impact 47.2/100 · MEDIUM

Which changes need focused human review? 848 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 2HIGH 76MEDIUM 20LOW 750

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 848 distinct pattern matches across 20 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers401 hits · 395 pts
SeverityFileLineSnippetContext
LOWkats/consts.py560 def _set_univariate_values_to_series(self) -> None:CODE
LOWkats/metrics/metrics.py283def absolute_percentage_error(CODE
LOWkats/metrics/metrics.py304def continuous_rank_probability_score(y_true: ArrayLike, y_pred: ArrayLike) -> float:CODE
LOWkats/metrics/metrics.py334def frequency_exceeds_relative_threshold(CODE
LOWkats/metrics/metrics.py351def linear_error_in_probability_space(y_true: ArrayLike, y_pred: ArrayLike) -> float:CODE
LOWkats/metrics/metrics.py392def median_absolute_percentage_error(y_true: ArrayLike, y_pred: ArrayLike) -> float:CODE
LOWkats/metrics/metrics.py446def mean_absolute_percentage_error(y_true: ArrayLike, y_pred: ArrayLike) -> float:CODE
LOWkats/metrics/metrics.py464def mean_absolute_scaled_error(y_true: ArrayLike, y_pred: ArrayLike) -> float:CODE
LOWkats/metrics/metrics.py566def root_mean_squared_log_error(CODE
LOWkats/metrics/metrics.py588def root_mean_squared_percentage_error(CODE
LOWkats/metrics/metrics.py612def scaled_symmetric_mean_absolute_percentage_error(CODE
LOWkats/metrics/metrics.py647def symmetric_mean_absolute_percentage_error(CODE
LOWkats/tests/test_ensemble.py194 def test_valid_params_base_params(self) -> None:CODE
LOWkats/tests/test_ensemble.py200 def test_invalid_params_in_ensemble_params(self) -> None:CODE
LOWkats/tests/test_ensemble.py476 def test_invalid_params_ensemble_params(CODE
LOWkats/tests/test_ensemble.py585 def test_fit_weightedavg_forecast(CODE
LOWkats/tests/test_ensemble.py650 def test_invalid_decomposition_method(self) -> None:CODE
LOWkats/tests/test_ensemble.py660 def test_invalid_seasonality_length(self) -> None:CODE
LOWkats/tests/test_ensemble.py675 def test_logging_default_executors(self) -> None:CODE
LOWkats/tests/test_consts.py366 def test_init_from_series_univar(self) -> None:CODE
LOWkats/tests/test_consts.py408 def test_init_from_series_multivar(self) -> None:CODE
LOWkats/tests/test_consts.py420 def test_init_from_index_univar(self) -> None:CODE
LOWkats/tests/test_consts.py431 def test_init_from_index_multivar(self) -> None:CODE
LOWkats/tests/test_consts.py496 def test_incorrect_init_types(self) -> None:CODE
LOWkats/tests/test_consts.py538 def test_incorrect_init_lengths(self) -> None:CODE
LOWkats/tests/test_consts.py1547 def test_exclude_starting_range(self) -> None:CODE
LOWkats/tests/test_consts.py1567 def test_exclude_ending_range(self) -> None:CODE
LOWkats/tests/test_consts.py1586 def test_exclude_middle_range(self) -> None:CODE
LOWkats/tests/test_consts.py1731 def test_basic_creation_without_confidence(self) -> None:CODE
LOWkats/tests/test_consts.py1741 def test_creation_with_valid_confidence_values(self) -> None:CODE
LOWkats/tests/test_consts.py1752 def test_creation_with_confidence_boundary_values(self) -> None:CODE
LOWkats/tests/test_consts.py1763 def test_creation_with_invalid_confidence_negative(self) -> None:CODE
LOWkats/tests/test_consts.py1775 def test_creation_with_invalid_confidence_above_one(self) -> None:CODE
LOWkats/tests/test_consts.py1787 def test_invalid_time_range_raises_error(self) -> None:CODE
LOWkats/tests/test_consts.py1807 def test_str_without_confidence(self) -> None:CODE
LOWkats/tests/test_consts.py1854 def test_ts_iterator_univariate_next(self) -> None:CODE
LOWkats/tests/test_consts.py1883 def test_ts_iterator_multivariate_next(self) -> None:CODE
LOWkats/tests/test_consts.py1919 def test_ts_iterator_comprehension(self) -> None:CODE
LOWkats/tests/metrics/test_metrics.py163 def test_absolute_percentage_error(CODE
LOWkats/tests/metrics/test_metrics.py184 def test_continuous_rank_probability_score(CODE
LOWkats/tests/metrics/test_metrics.py201 def test_frequency_exceeds_relative_threshold(CODE
LOWkats/tests/metrics/test_metrics.py222 def test_linear_error_in_probability_space(CODE
LOWkats/tests/metrics/test_metrics.py240 def test_median_absolute_error(CODE
LOWkats/tests/metrics/test_metrics.py258 def test_median_absolute_percent_error(CODE
LOWkats/tests/metrics/test_metrics.py313 def test_invalid_mean_absolute_error_multioutput(self) -> None:CODE
LOWkats/tests/metrics/test_metrics.py326 def test_mean_absolute_scaled_error(CODE
LOWkats/tests/metrics/test_metrics.py344 def test_mean_absolute_percent_error(CODE
LOWkats/tests/metrics/test_metrics.py380 def test_mean_percentage_error(CODE
LOWkats/tests/metrics/test_metrics.py419 def test_root_mean_squared_error(CODE
LOWkats/tests/metrics/test_metrics.py439 def test_root_mean_squared_log_error(CODE
LOWkats/tests/metrics/test_metrics.py459 def test_root_mean_squared_percentage_error(CODE
LOWkats/tests/metrics/test_metrics.py478 def test_scaled_symmetric_mean_absolute_percentage_error(CODE
LOWkats/tests/metrics/test_metrics.py521 def test_symmetric_mean_absolute_percentage_error(CODE
LOWkats/tests/compat/test_sklearn.py43 def test_root_mean_squared_error(self, sklearn_mse: Any) -> None:CODE
LOWkats/tests/compat/test_sklearn.py56 def test_mean_squared_log_error(self, sklearn_msle: Any) -> None:CODE
LOWkats/tests/compat/test_sklearn.py81 def test_root_mean_squared_log_error(self, sklearn_msle: Any) -> None:CODE
LOWkats/tests/utils/test_dataframe_utils.py36 def test_time_column_preserved(self) -> None:CODE
LOWkats/tests/utils/test_dataframe_utils.py50 def test_custom_time_column_preserved(self) -> None:CODE
LOWkats/tests/utils/test_dataframe_utils.py65 def test_error_when_prefix_matches_zero_columns(self) -> None:CODE
LOWkats/tests/utils/test_dataframe_utils.py79 def test_error_when_prefix_matches_multiple_columns(self) -> None:CODE
341 more matches not shown…
Cross-File Repetition32 hits · 160 pts
SeverityFileLineSnippetContext
HIGHkats/models/ml_ar.py0get default arima parameter search space. args: none returns: a dictionary with the default arima parameter search spaceSTRING
HIGHkats/models/holtwinters.py0get default arima parameter search space. args: none returns: a dictionary with the default arima parameter search spaceSTRING
HIGHkats/models/arima.py0get default arima parameter search space. args: none returns: a dictionary with the default arima parameter search spaceSTRING
HIGHkats/models/stlf.py0model class for theta this class provides fit, predict, and plot methods for theta model attributes: data: the input timSTRING
HIGHkats/models/var.py0model class for theta this class provides fit, predict, and plot methods for theta model attributes: data: the input timSTRING
HIGHkats/models/theta.py0model class for theta this class provides fit, predict, and plot methods for theta model attributes: data: the input timSTRING
HIGHkats/models/simple_heuristic_model.py0predict with fitted quadratic model. args: steps: the steps or length of the prediction horizon include_history: whetherSTRING
HIGHkats/models/linear_model.py0predict with fitted quadratic model. args: steps: the steps or length of the prediction horizon include_history: whetherSTRING
HIGHkats/models/quadratic_model.py0predict with fitted quadratic model. args: steps: the steps or length of the prediction horizon include_history: whetherSTRING
HIGHkats/models/nowcasting/nowcasting.py0the class for nowcasting parameters. takes parameters for class nowcastingmodel. attributes: step: an integer indicatingSTRING
HIGHkats/models/nowcasting/dynamic_nowcasting.py0the class for nowcasting parameters. takes parameters for class nowcastingmodel. attributes: step: an integer indicatingSTRING
HIGHkats/models/nowcasting/nowcastingplus.py0the class for nowcasting parameters. takes parameters for class nowcastingmodel. attributes: step: an integer indicatingSTRING
HIGHkats/models/nowcasting/nowcasting.py0raises: notimplementederror("subclasses should implement this!").STRING
HIGHkats/models/nowcasting/dynamic_nowcasting.py0raises: notimplementederror("subclasses should implement this!").STRING
HIGHkats/models/nowcasting/nowcastingplus.py0raises: notimplementederror("subclasses should implement this!").STRING
HIGHkats/models/nowcasting/nowcasting.py0the class for nowcastingplus model. this class performs data processing and short term prediction, for time series basedSTRING
HIGHkats/models/nowcasting/dynamic_nowcasting.py0the class for nowcastingplus model. this class performs data processing and short term prediction, for time series basedSTRING
HIGHkats/models/nowcasting/nowcastingplus.py0the class for nowcastingplus model. this class performs data processing and short term prediction, for time series basedSTRING
HIGHkats/models/nowcasting/nowcasting.py0loads model_as_str and decodes into the class nowcastingmodel. args: model_as_bytes: a binary variable, indicating whethSTRING
HIGHkats/models/nowcasting/dynamic_nowcasting.py0loads model_as_str and decodes into the class nowcastingmodel. args: model_as_bytes: a binary variable, indicating whethSTRING
HIGHkats/models/nowcasting/nowcastingplus.py0loads model_as_str and decodes into the class nowcastingmodel. args: model_as_bytes: a binary variable, indicating whethSTRING
HIGHkats/models/nowcasting/nowcasting.py0raises: notimplementederror("subclasses should implement this!")。STRING
HIGHkats/models/nowcasting/dynamic_nowcasting.py0raises: notimplementederror("subclasses should implement this!")。STRING
HIGHkats/models/nowcasting/nowcastingplus.py0raises: notimplementederror("subclasses should implement this!")。STRING
HIGHkats/detectors/threshold_detector.py0serialize the model into a json. serialize the model into a json so it can be loaded later. returns: json containing infSTRING
HIGHkats/detectors/bocpd_model.py0serialize the model into a json. serialize the model into a json so it can be loaded later. returns: json containing infSTRING
HIGHkats/detectors/prophet_detector.py0serialize the model into a json. serialize the model into a json so it can be loaded later. returns: json containing infSTRING
HIGHkats/detectors/outlier_detector.py0serialize the model into a json. serialize the model into a json so it can be loaded later. returns: json containing infSTRING
HIGHkats/detectors/multivariate_detector.py0serialize the model into a json. serialize the model into a json so it can be loaded later. returns: json containing infSTRING
HIGHkats/detectors/outlier_detector.py0trains a model, and returns the anomaly scores. returns the anomalyresponse, when data is passed to it. args: data: timeSTRING
HIGHkats/detectors/multivariate_detector.py0trains a model, and returns the anomaly scores. returns the anomalyresponse, when data is passed to it. args: data: timeSTRING
HIGHkats/detectors/prophet_detector.py0trains a model, and returns the anomaly scores. returns the anomalyresponse, when data is passed to it. args: data: timeSTRING
Docstring Block Structure25 hits · 125 pts
SeverityFileLineSnippetContext
HIGHkats/metrics/metrics.py110Ensure all arguments are arrays of matching size. Args: args: zero or more array-like values. Yields: STRING
HIGHkats/metrics/metadata.py131Get metadata about a metric, by name. Args: name: the metric name Returns: Metadata about thatSTRING
HIGHkats/utils/time_series_parameter_tuning.py91Checks if child class is instantiated. Throws an error if so. Args: metacls: To be used by metaclasSTRING
HIGHkats/utils/time_series_parameter_tuning.py372Check parameters objects structure. parameters object needs to be in a specific format. It needs to be STRING
HIGHkats/utils/time_series_parameter_tuning.py667The static method of factory class that creates the search method object. It does not require the class to be inSTRING
HIGHkats/utils/backtesters.py640Gets requested error value. Args: error_name: A string of the error whose value should be returned. STRING
HIGHkats/utils/backtesters.py1311Gets requested error value. Args: error_name: A string of the error whose value should be returned. STRING
HIGHkats/utils/simulator.py90Simulate data from ARIMA model. Data generation includes two steps: (1). Simulate data from ARMA(p', q)STRING
HIGHkats/utils/parameter_tuning_utils.py26Generates default search space as a list of dictionaries and returns it for prophet model. Each dictionary in the lSTRING
HIGHkats/utils/parameter_tuning_utils.py94Generates default search space as a list of dictionaries and returns it for arnet. Each dictionary in the list corrSTRING
HIGHkats/utils/parameter_tuning_utils.py136Generates default search space as a list of dictionaries and returns it for stfl. Each dictionary in the list correSTRING
HIGHkats/utils/parameter_tuning_utils.py172Generates default search space as a list of dictionaries and returns it for arima. Each dictionary in the list corrSTRING
HIGHkats/utils/parameter_tuning_utils.py214Generates default search space as a list of dictionaries and returns it for holtwinters. Each dictionary in the lisSTRING
HIGHkats/utils/parameter_tuning_utils.py262Generates default search space as a list of dictionaries and returns it for sarima. Each dictionary in the list corSTRING
HIGHkats/utils/parameter_tuning_utils.py326Generates default search space as a list of dictionaries and returns it for theta. Each dictionary in the list corrSTRING
HIGHkats/utils/parameter_tuning_utils.py356Generates default search space as a list of dictionaries and returns it for var. Each dictionary in the list corresSTRING
HIGHkats/utils/parameter_tuning_utils.py381Generates default search space as a list of dictionaries and returns it for lightgbm model. Each dictionary in the STRING
HIGHkats/utils/dataframe_utils.py19 Renames columns in the dataframe based on provided prefix mappings. Each prefix in prefix_map must match exactlSTRING
HIGHkats/detectors/interval_detector.py572Fit and predict on a Interval based AB test on time series data. Notes: - All entries of data and hSTRING
HIGHkats/detectors/interval_detector.py684Determine a critical value for a statistical test. Notes: If the user has passed a duration, then tSTRING
HIGHkats/detectors/interval_detector.py798Finds lowest m such that the corrected probability is still less than p in n trials. Notes: This meSTRING
HIGHkats/detectors/interval_detector.py844Finds a p so that the corrected p is with `r_tol` of `p_global` with n trials and m run size. Notes: STRING
HIGHkats/detectors/interval_detector.py1071P(at least 1 run of m consecutive rejections) in a vectorized formulation. Notes: - Passing cov=NonSTRING
HIGHkats/detectors/interval_detector.py1274Plot the ABTestResult. Warnings: This method can only be ran after `fit_predict`. Notes: STRING
HIGHkats/detectors/bocpd.py316The main detector method. This function runs the BOCPD detector and returns the list of changepoints. STRING
Unused Imports124 hits · 122 pts
SeverityFileLineSnippetContext
LOWkats/__init__.py6CODE
LOWkats/__init__.py7CODE
LOWkats/__init__.py8CODE
LOWkats/__init__.py9CODE
LOWkats/__init__.py10CODE
LOWkats/__init__.py11CODE
LOWkats/__init__.py12CODE
LOWkats/__init__.py13CODE
LOWkats/__init__.py14CODE
LOWkats/consts.py21CODE
LOWkats/metrics/__init__.py6CODE
LOWkats/metrics/__init__.py7CODE
LOWkats/metrics/__init__.py8CODE
LOWkats/compat/compat.py8CODE
LOWkats/compat/__init__.py6CODE
LOWkats/compat/__init__.py7CODE
LOWkats/compat/__init__.py8CODE
LOWkats/compat/__init__.py9CODE
LOWkats/tests/utils/test_cupik.py11CODE
LOWkats/tests/utils/test_emp_confidence_int.py13CODE
LOWkats/tests/tsfeatures/test_tsfeatures.py8CODE
LOWkats/tests/tsfeatures/test_tsfeatures.py12CODE
LOWkats/tests/tsfeatures/test_tsfeatures.py14CODE
LOWkats/tests/detectors/test_prophet_detector.py11CODE
LOWkats/tests/detectors/test_prophet_detector.py30CODE
LOWkats/utils/backtesters.py59CODE
LOWkats/utils/__init__.py6CODE
LOWkats/utils/__init__.py6CODE
LOWkats/utils/__init__.py6CODE
LOWkats/utils/__init__.py6CODE
LOWkats/utils/__init__.py6CODE
LOWkats/utils/__init__.py6CODE
LOWkats/utils/__init__.py16CODE
LOWkats/utils/simulator.py12CODE
LOWkats/utils/cupik.py17CODE
LOWkats/models/stlf.py16CODE
LOWkats/models/stlf.py16CODE
LOWkats/models/stlf.py16CODE
LOWkats/models/stlf.py16CODE
LOWkats/models/stlf.py16CODE
LOWkats/models/__init__.py6CODE
LOWkats/models/__init__.py6CODE
LOWkats/models/__init__.py6CODE
LOWkats/models/__init__.py6CODE
LOWkats/models/__init__.py6CODE
LOWkats/models/__init__.py6CODE
LOWkats/models/__init__.py6CODE
LOWkats/models/__init__.py22CODE
LOWkats/models/__init__.py22CODE
LOWkats/models/__init__.py22CODE
LOWkats/models/__init__.py22CODE
LOWkats/models/__init__.py22CODE
LOWkats/models/__init__.py22CODE
LOWkats/models/__init__.py22CODE
LOWkats/models/__init__.py22CODE
LOWkats/models/__init__.py22CODE
LOWkats/models/__init__.py22CODE
LOWkats/models/__init__.py22CODE
LOWkats/models/__init__.py17CODE
LOWkats/models/linear_model.py14CODE
64 more matches not shown…
Cross-Language Confusion18 hits · 118 pts
SeverityFileLineSnippetContext
HIGHkats/consts.py886 if not self.time.equals(other.time):CODE
HIGH⚡kats/tests/test_consts.py1140 ts_from_df_multi_new.min.equals(pd.DataFrame(new_val_multi).min()),CODE
HIGH⚡kats/tests/test_consts.py1146 ts_from_df_multi_new.max.equals(pd.DataFrame(new_val_multi).max()),CODE
HIGH⚡kats/tests/test_consts.py1156 ts_from_df_multi_new.min.equals(CODE
HIGH⚡kats/tests/test_consts.py1164 ts_from_df_multi_new.max.equals(CODE
HIGHkats/tests/test_consts.py1097 self.ts_from_df_multi.min.equals(CODE
HIGHkats/tests/test_consts.py1105 self.ts_from_df_multi.max.equals(CODE
HIGHkats/tests/models/test_var_model.py41 self.assertTrue(all(x.equals(index[0]) for x in index))CODE
HIGHkats/tests/models/test_metalearner.py200 return v1.equals(v2)CODE
HIGHkats/tests/models/test_theta_model.py243 self.assertFalse(ts.value.equals(deseas_data.value))CODE
HIGHkats/tests/tsfeatures/test_tsfeatures.py535 # pyre-fixme[61]: `df` is undefined, or not always defined.COMMENT
HIGHkats/tests/tsfeatures/test_tsfeatures.py755 f1.equals(f2),CODE
HIGHkats/tests/detectors/test_prophet_detector.py137 # pyre-fixme[61]: `rest_days` is undefined, or not always defined.COMMENT
HIGHkats/models/ml_ar.py1208 # pyre-fixme[61]: `fc_wide` is undefined, or not always defined.COMMENT
HIGHkats/models/prophet.py1034 # pyre-fixme[61]: `possion_sample` is undefined, or not always defined.COMMENT
HIGHkats/models/globalmodel/model.py564 # pyre-fixme[61]: `actual` is undefined, or not always defined.COMMENT
HIGHkats/detectors/cusum_model.py352 # pyre-fixme[61]: `check_decrease` is undefined, or not always defined.COMMENT
HIGHkats/detectors/cusum_model.py355 # pyre-fixme[61]: `check_increase` is undefined, or not always defined.COMMENT
Deep Nesting63 hits · 60 pts
SeverityFileLineSnippetContext
LOWkats/consts.py237CODE
LOWkats/consts.py890CODE
LOWkats/consts.py984CODE
LOWkats/compat/pandas.py91CODE
LOWkats/tests/test_ensemble.py382CODE
LOWkats/tests/models/test_stlf_model.py121CODE
LOWkats/tests/models/test_metalearner.py196CODE
LOWkats/utils/time_series_parameter_tuning.py1223CODE
LOWkats/utils/time_series_parameter_tuning.py214CODE
LOWkats/utils/time_series_parameter_tuning.py546CODE
LOWkats/utils/time_series_parameter_tuning.py652CODE
LOWkats/utils/ensemble_predict_interval.py85CODE
LOWkats/utils/datapartition.py59CODE
LOWkats/models/ml_ar.py416CODE
LOWkats/models/ml_ar.py507CODE
LOWkats/models/ml_ar.py711CODE
LOWkats/models/ml_ar.py744CODE
LOWkats/models/ml_ar.py859CODE
LOWkats/models/ml_ar.py1143CODE
LOWkats/models/stlf.py124CODE
LOWkats/models/stlf.py262CODE
LOWkats/models/prophet.py633CODE
LOWkats/models/prophet.py828CODE
LOWkats/models/neuralprophet.py442CODE
LOWkats/models/reconciliation/thm.py195CODE
LOWkats/models/reconciliation/thm.py250CODE
LOWkats/models/reconciliation/thm.py306CODE
LOWkats/models/reconciliation/thm.py362CODE
LOWkats/models/ensemble/kats_ensemble.py192CODE
LOWkats/models/ensemble/kats_ensemble.py461CODE
LOWkats/models/metalearner/metalearner_hpt.py347CODE
LOWkats/models/metalearner/metalearner_modelselect.py263CODE
LOWkats/models/globalmodel/model.py111CODE
LOWkats/models/globalmodel/model.py206CODE
LOWkats/models/globalmodel/model.py266CODE
LOWkats/models/globalmodel/model.py1054CODE
LOWkats/models/globalmodel/model.py1207CODE
LOWkats/models/globalmodel/model.py220CODE
LOWkats/models/globalmodel/utils.py85CODE
LOWkats/models/globalmodel/utils.py385CODE
LOWkats/models/globalmodel/utils.py557CODE
LOWkats/models/globalmodel/utils.py1183CODE
LOWkats/models/globalmodel/utils.py1387CODE
LOWkats/models/globalmodel/utils.py1428CODE
LOWkats/models/globalmodel/utils.py1471CODE
LOWkats/models/globalmodel/backtester.py196CODE
LOWkats/models/globalmodel/backtester.py303CODE
LOWkats/tsfeatures/tsfeatures.py378CODE
LOWkats/tsfeatures/tsfeatures.py486CODE
LOWkats/tsfeatures/tsfeatures.py1519CODE
LOWkats/tsfeatures/tsfeatures.py1656CODE
LOWkats/tsfeatures/tsfeatures.py2146CODE
LOWkats/detectors/interval_detector.py836CODE
LOWkats/detectors/anomaly_postprocessing.py160CODE
LOWkats/detectors/cusum_detection.py977CODE
LOWkats/detectors/cusum_detection.py1144CODE
LOWkats/detectors/dtwcpd.py275CODE
LOWkats/detectors/prophet_detector.py232CODE
LOWkats/detectors/trend_mk.py477CODE
LOWkats/detectors/cusum_model.py180CODE
3 more matches not shown…
Excessive Try-Catch Wrapping45 hits · 44 pts
SeverityFileLineSnippetContext
LOWkats/tests/models/test_metalearner.py208 except Exception as e:CODE
LOWkats/tests/models/test_globalmodel.py774 except Exception as e:CODE
LOWkats/tests/models/test_globalmodel.py1000 except Exception as e:CODE
LOWkats/tests/detectors/test_bocpd.py403 except Exception:CODE
LOWkats/utils/time_series_parameter_tuning.py237 except Exception as e:CODE
LOWkats/utils/time_series_parameter_tuning.py251 except Exception as e:CODE
LOWkats/utils/backtesters.py125 except Exception as e:CODE
LOWkats/utils/backtesters.py162 except Exception as e:CODE
LOWkats/utils/backtesters.py247 except Exception as e:CODE
LOWkats/utils/backtesters.py625 except Exception as e:CODE
LOWkats/models/var.py213 except Exception as e:CODE
LOWkats/models/prophet.py451 except Exception as e:CODE
LOWkats/models/arima.py308 except Exception as e:CODE
LOWkats/models/reconciliation/thm.py185 except Exception:CODE
LOWkats/models/reconciliation/thm.py216 except Exception as e:CODE
LOWkats/models/reconciliation/thm.py524 except Exception:CODE
LOWkats/models/metalearner/metalearner_hpt.py769 except Exception as e:CODE
LOWkats/models/metalearner/metalearner_predictability.py124 except Exception as e:CODE
LOWkats/models/metalearner/metalearner_predictability.py246 except Exception as e:CODE
LOWkats/models/metalearner/metalearner_predictability.py364 except Exception as e:CODE
LOWkats/models/metalearner/metalearner_modelselect.py379 except Exception:CODE
LOW⚡kats/models/metalearner/get_metadata.py142 except Exception:CODE
LOWkats/models/metalearner/get_metadata.py248 except Exception as e:CODE
LOWkats/models/globalmodel/model.py1285 except Exception as e:CODE
LOWkats/models/globalmodel/utils.py109 except Exception as e:CODE
LOWkats/models/globalmodel/utils.py1483 except Exception as e:CODE
LOWkats/models/globalmodel/stdmodel.py124 except Exception as e:CODE
LOWkats/models/globalmodel/backtester.py227 except Exception as e:CODE
LOWkats/models/globalmodel/ensemble.py376 except Exception as e:CODE
LOWkats/models/globalmodel/ensemble.py436 except Exception as e:CODE
LOWkats/models/globalmodel/ensemble.py561 except Exception as e:CODE
LOWkats/tsfeatures/tsfeatures.py1390 except Exception as e:CODE
LOWkats/tsfeatures/tsfeatures.py1434 except Exception as e:CODE
LOWkats/tsfeatures/tsfeatures.py1513 except Exception as e:CODE
LOWkats/tsfeatures/tsfeatures.py1558 except Exception as e:CODE
LOWkats/tsfeatures/tsfeatures.py1612 except Exception as e:CODE
LOWkats/tsfeatures/tsfeatures.py1650 except Exception as e:CODE
LOWkats/tsfeatures/tsfeatures.py1710 except Exception as e:CODE
LOWkats/tsfeatures/tsfeatures.py1897 except Exception as e:CODE
LOWkats/tsfeatures/tsfeatures.py1984 except Exception as e:CODE
LOWkats/tsfeatures/tsfeatures.py2116 except Exception as e:CODE
LOWkats/tsfeatures/tsfeatures.py2234 except Exception:CODE
LOW…etectors/meta_learning/metalearning_detection_model.py57 except Exception as e:CODE
LOWkats/detectors/meta_learning/hpt_tuning.py180 except Exception as e:STRING
LOWkats/detectors/meta_learning/hpt_tuning.py290 except Exception as e:STRING
AI Structural Patterns40 hits · 39 pts
SeverityFileLineSnippetContext
LOWkats/consts.py237CODE
LOWkats/compat/pandas.py32CODE
LOWkats/compat/pandas.py91CODE
LOWkats/compat/pandas.py175CODE
LOWkats/compat/statsmodels.py57CODE
LOWkats/utils/time_series_parameter_tuning.py652CODE
LOWkats/utils/time_series_parameter_tuning.py961CODE
LOWkats/utils/emp_confidence_int.py268CODE
LOWkats/utils/ensemble_predict_interval.py352CODE
LOWkats/utils/decomposition.py235CODE
LOWkats/utils/simulator.py329CODE
LOWkats/utils/simulator.py410CODE
LOWkats/utils/simulator.py486CODE
LOWkats/utils/simulator.py556CODE
LOWkats/models/ml_ar.py187CODE
LOWkats/models/ml_ar.py1052CODE
LOWkats/models/stlf.py89CODE
LOWkats/models/var.py225CODE
LOWkats/models/sarima.py73CODE
LOWkats/models/sarima.py169CODE
LOWkats/models/prophet.py116CODE
LOWkats/models/neuralprophet.py160CODE
LOWkats/models/arima.py143CODE
LOWkats/models/metalearner/metalearner_hpt.py521CODE
LOWkats/models/metalearner/metalearner_hpt.py774CODE
LOWkats/models/metalearner/get_metadata.py94CODE
LOWkats/models/globalmodel/utils.py1183CODE
LOWkats/models/globalmodel/stdmodel.py51CODE
LOWkats/tsfeatures/tsfeatures.py311CODE
LOWkats/detectors/outlier_detector.py150CODE
LOWkats/detectors/rolling_stats_model.py218CODE
LOWkats/detectors/multivariate_detector.py186CODE
LOWkats/detectors/stat_sig_detector.py92CODE
LOWkats/detectors/stat_sig_detector.py605CODE
LOWkats/detectors/stat_sig_detector.py997CODE
LOWkats/detectors/prophet_detector.py353CODE
LOWkats/detectors/prophet_detector.py684CODE
LOWkats/detectors/bocpd.py305CODE
LOWkats/detectors/cusum_model.py180CODE
LOWkats/detectors/cusum_model.py1106CODE
Self-Referential Comments14 hits · 34 pts
SeverityFileLineSnippetContext
MEDIUMsphinx/source/conf.py10# This file is execfile()d with the current directory set to itsCOMMENT
MEDIUMkats/tests/test_backtester_dummy_data.py8# This file contains dummy data for the Backtester unit testsCOMMENT
MEDIUMkats/tests/utils/test_backtest.py8# This file defines tests for the Backtester classesCOMMENT
MEDIUMkats/tests/utils/test_decomposition.py630 # Create a STL-based simulated objectCOMMENT
MEDIUMkats/tests/utils/test_decomposition.py650 # Create a STL-based simulated objectCOMMENT
MEDIUMkats/tests/models/test_models_dummy_data.py8# This file contains dummy data for the model unit testsCOMMENT
MEDIUMkats/tests/evaluation/test_evaluator.py8# This file defines tests for the abstract Evaluator classCOMMENT
MEDIUMkats/tests/detectors/test_interval_detector.py587 # Create a covariance matrix with positive correlations (rho=0.5 between all pairs)COMMENT
MEDIUMkats/utils/backtesters.py185 >>> # Define the forecasterSTRING
MEDIUMkats/models/metalearner/metalearner_predictability.py52 >>> mlp2 = MetaLearnPredictability(load_model=True) # Create a new object to load the trained modelSTRING
MEDIUMkats/models/metalearner/metalearner_modelselect.py58 >>> mlms2 = MetaLearnModelSelect(metadata=None, load_model=True) # Create a new object and then load a pre-trainSTRING
MEDIUMkats/tsfeatures/tsfeatures.py914 # Create the range of lag valuesCOMMENT
MEDIUMkats/detectors/detector.py52 # Create the new class object (callable)COMMENT
MEDIUMkats/detectors/seasonality.py8"""This module is for seasonality detection.STRING
Over-Commented Block29 hits · 26 pts
SeverityFileLineSnippetContext
LOWsphinx/source/conf.py1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWsphinx/source/conf.py61copyright = u"2021, Facebook Inc."COMMENT
LOWsphinx/source/conf.py81# non-false value, then it is used:COMMENT
LOWsphinx/source/conf.py101# If true, sectionauthor and moduleauthor directives will be shown in theCOMMENT
LOWsphinx/source/conf.py121# a list of builtin themes.COMMENT
LOWsphinx/source/conf.py141# html_logo = NoneCOMMENT
LOWsphinx/source/conf.py161# .htaccess) here, relative to this directory. These files are copiedCOMMENT
LOWsphinx/source/conf.py181# html_domain_indices = TrueCOMMENT
LOWkats/metrics/metrics.py21with warnings.catch_warnings():COMMENT
LOWkats/tests/__init__.py1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWkats/tests/utils/test_time_series_parameter_tuning.py301COMMENT
LOWkats/tests/utils/test_time_series_parameter_tuning.py321 # parameters=prophet_small_grid,COMMENT
LOWkats/tests/utils/test_time_series_parameter_tuning.py601COMMENT
LOWkats/tests/utils/test_time_series_parameter_tuning.py621 # set(parameter_values_with_scores),COMMENT
LOWkats/tests/utils/test_time_series_parameter_tuning.py641COMMENT
LOWkats/tests/utils/test_time_series_parameter_tuning.py661 # )COMMENT
LOWkats/tests/utils/test_emp_confidence_int.py41COMMENT
LOWkats/tests/utils/test_emp_confidence_int.py101 668.0317888909123,COMMENT
LOWkats/tests/models/__init__.py1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWkats/tests/detectors/__init__.py1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWkats/tests/detectors/meta_learning/__init__.py1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWkats/models/reconciliation/__init__.py1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWkats/models/nowcasting/__init__.py1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWkats/tsfeatures/__init__.py1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWkats/detectors/detector_consts.py401 # if both control and test have one value, then using a t test does not make any senseCOMMENT
LOWkats/detectors/bocpd.py901 + message[self.T + m_ptr : self.T, self._ts_slice]COMMENT
LOWkats/detectors/bocpd.py921 # = log(e^x_1 + e^(log(e^x_2 + ... + e^x_n)))COMMENT
LOWkats/detectors/meta_learning/__init__.py1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWkats/graphics/__init__.py1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
Redundant / Tautological Comments11 hits · 20 pts
SeverityFileLineSnippetContext
LOW⚡kats/consts.py484 # Check if time values are equalCOMMENT
LOW⚡kats/consts.py492 # Check if value Series are equalCOMMENT
LOW⚡kats/consts.py501 # Check if value DataFrames are equal (ignore column order)COMMENT
LOW⚡kats/models/metalearner/get_metadata.py122 # Check if the data type is TimeSeriesDataCOMMENT
LOW⚡kats/models/metalearner/get_metadata.py130 # Check if the time series is univariateCOMMENT
LOW⚡kats/models/metalearner/get_metadata.py138 # Check if use customized tune Executor.COMMENT
LOWkats/evaluation/evaluator.py46 if not isinstance(run_name, str): # Check if name is a stringCODE
LOWkats/evaluation/evaluator.py55 self._check_if_valid_run_name(run_name=run_name) # Check if valid runCODE
LOW⚡kats/evaluation/evaluator.py78 self._check_if_valid_run_name(run_name=run_name) # Check if valid runCODE
LOW⚡kats/evaluation/evaluator.py80 if np.ndim(evaluator.preds) < 1: # Check if predictions are a valid typeCODE
LOW⚡kats/evaluation/evaluator.py83 if np.ndim(labels) < 1: # Check if labels are a valid typeCODE
Hallucination Indicators2 hits · 20 pts
SeverityFileLineSnippetContext
CRITICALkats/tests/detectors/test_detector_consts.py842 score_list = self.response.scores.value.values.tolist()CODE
CRITICALkats/tests/detectors/test_detector_consts.py1135 score_list = self.response.scores.value.values.tolist()CODE
AI Slop Vocabulary9 hits · 20 pts
SeverityFileLineSnippetContext
MEDIUMkats/consts.py1030 # convert to pandas.DataFrame so that we can leverage the built-in methodsCOMMENT
LOWkats/tests/test_ensemble.py338 # the backtester should just return a random number hereCOMMENT
LOWkats/tests/test_ensemble.py414 # the backtester should just return a random number hereCOMMENT
LOWkats/tests/models/test_ensemble.py340 # the backtester should just return a random number hereCOMMENT
MEDIUMkats/models/ml_ar.py333 # [TODO]: more comprehensive parameter check.COMMENT
MEDIUMkats/models/simple_heuristic_model.py175 # TO DO: infer more robust frequencyCOMMENT
MEDIUMkats/tsfeatures/tsfeatures.py44 # This is a temporary workaround to facilitate Numpy upgrade. The importCOMMENT
LOWkats/detectors/stat_sig_detector.py232 # just return the initial response of zerosCOMMENT
LOWkats/detectors/stat_sig_detector.py1055 # just return the initial response of zerosCOMMENT
Modern Structural Boilerplate17 hits · 15 pts
SeverityFileLineSnippetContext
LOWkats/consts.py560 def _set_univariate_values_to_series(self) -> None:CODE
LOWkats/consts.py1361__all__ = [CODE
LOWkats/models/globalmodel/model.py111 def _set_nn_status(self, mode: str) -> None:CODE
LOWkats/tsfeatures/tsfeatures.py422 def _set_defaults(self, kwargs: Dict[str, Any], default: bool) -> None:CODE
LOWkats/detectors/stat_sig_detector.py818 def _update_response(self, date: pd.Timestamp) -> None:CODE
LOWkats/detectors/stat_sig_detector.py886 def _update_control_test(self, data: TimeSeriesData) -> None:CODE
LOWkats/detectors/stat_sig_detector.py907 def _update_data(self, data: TimeSeriesData) -> None:CODE
LOWkats/detectors/stat_sig_detector.py1217 def _update_response(self, date: pd.Timestamp) -> None:CODE
LOWkats/detectors/stat_sig_detector.py1260 def _update_control_test(self, data: TimeSeriesData) -> None:CODE
LOWkats/detectors/bocpd.py145 def set_prior(self, param_dict: Dict[str, float]) -> None:CODE
LOWkats/detectors/bocpd.py194 def set_prior(self, param_dict: Dict[str, float]) -> None:CODE
LOWkats/detectors/bocpd.py1188 def update_sufficient_stats(self, x: float) -> None:STRING
LOWkats/detectors/bocpd.py1370 def update_sufficient_stats(self, x: float) -> None:STRING
LOWkats/detectors/bocpd.py1756 def update_sufficient_stats(self, x: float) -> None:STRING
LOWkats/detectors/bocpd.py1869 def update_sufficient_stats(self, x: float) -> None:STRING
LOWkats/detectors/cusum_model.py318 def _set_alert_off(self) -> None:CODE
LOWkats/detectors/cusum_model.py1208 def _set_alert_off_multi_ts(self, set_off_mask: pd.Series) -> None:CODE
Verbosity Indicators5 hits · 9 pts
SeverityFileLineSnippetContext
LOWkats/utils/simulator.py129 # Step 1: simulate ARMA(p, q)COMMENT
LOWkats/utils/simulator.py157 # Step 2: add drift, unit rootsCOMMENT
LOW⚡kats/detectors/interval_detector.py619 # Step 1: Determine critical_value of test_statistic.COMMENT
LOW⚡kats/detectors/interval_detector.py622 # Step 2: Get a test_statistic for each time value.COMMENT
LOWkats/detectors/interval_detector.py646 # Step 4: Return to user.COMMENT
Structural Annotation Overuse5 hits · 9 pts
SeverityFileLineSnippetContext
LOWkats/utils/simulator.py129 # Step 1: simulate ARMA(p, q)COMMENT
LOWkats/utils/simulator.py157 # Step 2: add drift, unit rootsCOMMENT
LOW⚡kats/detectors/interval_detector.py619 # Step 1: Determine critical_value of test_statistic.COMMENT
LOW⚡kats/detectors/interval_detector.py622 # Step 2: Get a test_statistic for each time value.COMMENT
LOWkats/detectors/interval_detector.py646 # Step 4: Return to user.COMMENT
Empty Error Handlers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHkats/compat/compat.py62except metadata.PackageNotFoundError:CODE
Dead Code2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUMkats/models/nowcasting/feature_extraction.py181CODE
MEDIUMkats/models/nowcasting/feature_extraction.py216CODE
Example Usage Blocks4 hits · 2 pts
SeverityFileLineSnippetContext
LOWkats/utils/decomposition.py288 >>> # Example usage:STRING
LOWkats/detectors/anomaly_postprocessing.py48 >>> # Example usage:STRING
LOWkats/detectors/stat_sig_detector.py70 >>> # Example usage:STRING
LOWkats/detectors/stat_sig_detector.py963 >>> # Example usage:STRING
TODO Padding1 hit · 2 pts
SeverityFileLineSnippetContext
LOWkats/consts.py881 # TODO: implement multivariate time series operation with constantCOMMENT