MCPcopy Index your code

hub / github.com/yzhao062/pyod / functions

Functions2,677 in github.com/yzhao062/pyod

↓ 258 callersMethodpredict_proba
Predict the probability of a sample being outlier. Calling xgboost `predict_proba` function. Parameters ---------- X
pyod/models/xgbod.py:399
↓ 197 callersMethodfit_predict_score
Fit the detector, predict on samples, and evaluate the model by predefined metrics, e.g., ROC. Parameters ----------
pyod/models/xgbod.py:423
↓ 160 callersMethoddecision_function
(self, X)
pyod/test/test_base.py:52
↓ 127 callersMethodpredict
(self, X)
pyod/test/test_cd.py:171
↓ 125 callersFunctiongenerate_data
Utility function to generate synthesized data. Normal data is generated by a multivariate Gaussian distribution and outliers are generated b
pyod/utils/data.py:113
↓ 110 callersMethodfit
(self, X, y=None)
pyod/test/test_base.py:49
↓ 103 callersFunctionevaluate_print
Utility function for evaluating and printing the results for examples. Default metrics include ROC and Precision @ n Parameters -----
pyod/utils/data.py:278
↓ 89 callersMethodpredict_with_rejection
Predict if a particular sample is an outlier or not, allowing the detector to reject (i.e., output = -2) low confidence predic
pyod/models/base.py:299
↓ 76 callersMethodfit
Fit detector. y is ignored in unsupervised methods. Parameters ---------- X : numpy array of shape (n_samples, n_features)
pyod/models/cd.py:163
↓ 72 callersMethod_predict_rank
Predict the outlyingness rank of a sample by a fitted model. The method is for outlier detector score combination. Parameters
pyod/models/base.py:460
↓ 69 callersMethodto
(self, device)
pyod/models/ts_lstm.py:348
↓ 59 callersMethod_process_decision_scores
This overrides PyOD base class function in order to use the proper `threshold_` which is quite different in the base class. Internal f
pyod/models/mad.py:144
↓ 59 callersMethod_set_n_classes
Set the number of classes if `y` is presented, which is not expected. It could be useful for multi-class outlier detection. Parameter
pyod/models/base.py:537
↓ 58 callersMethodpredict
Predict if a particular sample is an outlier or not. Calling xgboost `predict` function. Parameters ---------- X : nu
pyod/models/xgbod.py:370
↓ 56 callersMethoddecision_function
Predict raw anomaly score of X using the fitted detector. For consistency, outliers are assigned with larger anomaly scores. Paramete
pyod/models/cd.py:195
↓ 55 callersFunctioncheck_parameter
Check if an input is within the defined range. Parameters ---------- param : int, float The input parameter to check. low :
pyod/utils/utility.py:27
↓ 53 callersMethodfit_predict
(self, X, y)
pyod/models/xgbod.py:419
↓ 42 callersMethodstart
Start an investigation session. Profiles the data and returns an InvestigationState. Parameters ---------- X : array
pyod/utils/ad_engine.py:1091
↓ 41 callersMethodplan_detection
Plan a detection pipeline. Parameters ---------- profile : dict Output of profile_data(). priority : str
pyod/utils/ad_engine.py:210
↓ 40 callersMethodrun
(self)
pyod/test/test_mcp_server_import.py:125
↓ 36 callersMethodtransform
(self, X)
pyod/test/test_ad_engine.py:878
↓ 35 callersMethodplan
Plan detection: select top-N detectors. Wraps ``plan_detection()`` and extracts primary + alternatives into ``state.plans`` (up to 3
pyod/utils/ad_engine.py:1128
↓ 34 callersFunction_to_json
Serialize result to JSON string.
pyod/mcp_server.py:61
↓ 34 callersFunctionvisualize
Utility function for visualizing the results in examples. Internal use only. Parameters ---------- clf_name : str The name of
pyod/utils/example.py:17
↓ 27 callersMethoditerate
Iterate based on feedback. Structured dicts execute immediately. NL strings are parsed with confidence; ambiguous feedback triggers
pyod/utils/ad_engine.py:1456
↓ 27 callersMethodparameters
(self)
pyod/models/ts_lstm.py:345
↓ 25 callersMethodexplain_findings
Explain why specific samples were flagged as anomalies. Parameters ---------- result : dict Output of run_detecti
pyod/utils/ad_engine.py:809
↓ 24 callersMethodprofile_data
Profile the input data. Parameters ---------- X : array-like, list, or dict Input data. data_type : str o
pyod/utils/ad_engine.py:76
↓ 23 callersMethodeval
(self)
pyod/models/ts_lstm.py:355
↓ 23 callersFunctiongenerate_data_categorical
Utility function to generate synthesized categorical data. Parameters ---------- n_train : int, (default=1000) The number of
pyod/utils/data.py:512
↓ 23 callersFunctionload
Load a PyOD detector saved by `save()` or by raw joblib.dump. `load()` understands three input shapes: 1. An envelope dict written by `save(
pyod/utils/persistence.py:166
↓ 22 callersMethodrun_detection
Execute a detection plan. Parameters ---------- X_train : array-like Training data. plan : dict (Detectio
pyod/utils/ad_engine.py:677
↓ 21 callersFunctiongenerate_ts_data
Generate synthetic time series data with injected anomalies. Creates a sinusoidal base signal with Gaussian noise and injects anomalies at
pyod/utils/data.py:655
↓ 21 callersFunctionget_activation_by_name
Get activation function by name Parameters ---------- name : str Activation function name. Available functions: 'el
pyod/utils/torch_utility.py:153
↓ 20 callersMethodanalyze
Analyze detection results with quality assessment. Computes per-detector analysis, consensus analysis, quality metrics (separation, a
pyod/utils/ad_engine.py:1319
↓ 19 callersFunctioninvert_order
Invert the order of a list of values. The smallest value becomes the largest in the inverted list. This is useful while combining multiple de
pyod/utils/utility.py:392
↓ 18 callersFunction_fit_small_sklearn_iforest
(n_estimators=1, random_state=0)
pyod/test/test_persistence.py:227
↓ 18 callersMethodanalyze_results
Analyze detection results. Parameters ---------- result : dict Output of run_detection(). X : array-like
pyod/utils/ad_engine.py:742
↓ 18 callersMethodtrain
(self)
pyod/models/ts_lstm.py:352
↓ 16 callersMethodbuild_detector
Build and return an unfitted detector from a plan. Parameters ---------- plan : dict (DetectionPlan) Output of pl
pyod/utils/ad_engine.py:625
↓ 16 callersFunctiongenerate_graph_data
Generate synthetic attributed graph data with planted anomalies. Normal nodes have features from N(0, 1). Anomaly nodes have features shif
pyod/utils/data.py:785
↓ 16 callersMethodget_kb_for_routing
Return a structured KB snapshot for caller-driven detector selection. This is the agent-facing companion to :meth:`plan_detection`.
pyod/utils/ad_engine.py:346
↓ 16 callersMethodlist_detectors
List available detectors. Parameters ---------- data_type : str or None Filter by data type (e.g. 'tabular', 'tex
pyod/utils/ad_engine.py:1830
↓ 15 callersMethod_quality
Call the quality function via whichever path is available. During PR 1 the helper module does not yet exist; we use the private metho
pyod/test/test_ad_engine_v3.py:371
↓ 15 callersMethodencode
(self, x)
pyod/models/vae.py:367
↓ 15 callersMethodfit
Fit detector on raw input data. Encodes X into embeddings, applies preprocessing, then fits the inner detector. Parameters
pyod/models/embedding.py:205
↓ 15 callersMethodfit
Fit a detector per modality on the input data. Parameters ---------- X : dict of {str: data} Maps modality name t
pyod/models/embedding.py:563
↓ 15 callersMethodsuggest_next_step
Suggest what to try next. Parameters ---------- result : dict Output of run_detection(). analysis : dict
pyod/utils/ad_engine.py:892
↓ 14 callersMethodget_algorithm
Get algorithm metadata by name. Returns None if not found.
pyod/utils/knowledge/__init__.py:65
↓ 14 callersMethodload
Load the model from the specified path. Parameters ---------- path : str The path to load the model. Ret
pyod/models/base_dl.py:333
↓ 13 callersFunction_import_regen_skill
Import the generator script as a module by file path.
pyod/test/test_regen_skill.py:11
↓ 13 callersFunctioncompat_load
Load an artifact whose sklearn Tree node dtype no longer matches. Mirrors `joblib.load` but plugs a dispatch-table override into joblib's unp
pyod/utils/persistence.py:387
↓ 13 callersMethodencode
Encode multi-modal input and concatenate. Parameters ---------- X : dict of {str: data} Maps modality name to inp
pyod/utils/encoders/__init__.py:161
↓ 13 callersFunctiongenerate_data_clusters
Utility function to generate synthesized data in clusters. Generated data can involve the low density pattern problem and global outli
pyod/utils/data.py:305
↓ 13 callersMethodinvestigate
One-shot investigation: start → plan → run → analyze. Parameters ---------- X : array-like Input data. da
pyod/utils/ad_engine.py:1805
↓ 13 callersFunctionstandardizer
Conduct Z-normalization on data to turn input samples become zero-mean and unit variance. Parameters ---------- X : numpy array of sh
pyod/utils/utility.py:125
↓ 13 callersFunctionvalidate_ts_input
Validate and reshape time series input. Parameters ---------- X : array-like Time series data. 1D (n_timestamps,) or 2D (n_timest
pyod/models/_ts_utils.py:8
↓ 12 callersFunction_make_aged_pickle
Save ``detector`` to ``path`` after rewiring its trees through ``_OldDtypeTree``. ``transform`` overrides the per-nodes-array transformation;
pyod/test/test_persistence.py:204
↓ 12 callersMethodcompare_detectors
Compare detectors. When `names` is provided, returns explanations for those detectors in input order. When `names` is omitte
pyod/utils/ad_engine.py:1939
↓ 12 callersMethodcontamination_diagnostics
Diagnostic helper for contamination calibration. Reports the contamination value the run actually used, the actual flagged rate from
pyod/utils/ad_engine.py:1598
↓ 12 callersFunctionresolve_encoder
Resolve an encoder from various input types. Parameters ---------- encoder : str, BaseEncoder, or callable - If BaseEncoder insta
pyod/utils/encoders/__init__.py:341
↓ 11 callersFunction_fit_small_iforest
(n_estimators=1, random_state=0)
pyod/test/test_persistence.py:219
↓ 11 callersFunction_noise_clips
(n, seconds=1.0, sr=SR, seed=0)
pyod/test/test_audio.py:20
↓ 11 callersMethod_run_to_analyzed
(self)
pyod/test/test_contamination_diagnostics.py:29
↓ 11 callersMethod_tmp
(self, name='artifact.joblib')
pyod/test/test_persistence.py:254
↓ 11 callersFunction_write_envelope
Write a hand-crafted envelope for tests that need to control dependency-version fields. Mirrors ``save()`` but lets the test inject specific v
pyod/test/test_persistence.py:589
↓ 11 callersFunctioncolumn_ecdf
Utility function to compute the column wise empirical cumulative distribution of a 2D feature matrix, where the rows are samples and the colu
pyod/utils/stat_models.py:188
↓ 11 callersMethodvalidate
Hindsight validation of consensus and per-detector results. Computes label-based metrics from `y` against the consensus labels and ea
pyod/utils/ad_engine.py:1699
↓ 11 callersFunctionvalidate_structured_feedback
Raise ValueError if feedback dict is malformed. Validates only structure and required fields. Does not validate semantic content (e.g., wheth
pyod/utils/_nl_feedback.py:44
↓ 10 callersFunction_get_engine
Lazy ADEngine singleton for the tool functions.
pyod/mcp_server.py:52
↓ 10 callersMethod_run_to_analyzed
(self)
pyod/test/test_validate.py:40
↓ 10 callersFunction_znormalize
Z-normalize a vector. Returns zero vector if std is near zero.
pyod/models/ts_kshape.py:26
↓ 10 callersMethodfit_transform
(self, X)
pyod/test/test_ad_engine.py:875
↓ 10 callersFunctionparse_routing_response
Parse an LLM routing response into ``(detector_choices, justifications)``. Parameters ---------- response : str The raw LLM text.
pyod/utils/_llm.py:178
↓ 9 callersMethodfit
Fit detector on time series data. Validates the input, creates sliding windows, fits the inner detector on the window matrix, and map
pyod/models/ts_od.py:90
↓ 9 callersMethodfit
Fit the detector on graph data. Parameters ---------- X : Data or array-like PyG Data object, or node featur
pyod/models/pyg_scan.py:82
↓ 9 callersMethodfit
Fit detector. y is assumed to be 0 for all training samples. Parameters ---------- X : numpy array of shape (n_samples, n_feat
pyod/models/lunar.py:280
↓ 9 callersMethodmake_plan
Commit a caller-driven detector plan and return a DetectionPlan. Companion to :meth:`get_kb_for_routing`. The caller (LLM agent, rule
pyod/utils/ad_engine.py:482
↓ 9 callersMethodrun
Run detection with all planned detectors. Wraps ``run_detection()`` per plan. Computes consensus via rank normalization and majority
pyod/utils/ad_engine.py:1192
↓ 8 callersFunction_make_history_entry
Create a HistoryEntry dict.
pyod/utils/investigation.py:68
↓ 8 callersMethod_state_with_one_failure
(self)
pyod/test/test_recover.py:54
↓ 8 callersMethod_state_with_one_failure
(self)
pyod/test/test_recover.py:135
↓ 8 callersMethod_tmp
(self, name='artifact.joblib')
pyod/test/test_persistence.py:625
↓ 8 callersMethodfor_text
Create an EmbeddingOD configured for text anomaly detection. Configurations are informed by NLP-ADBench (EMNLP 2025). Parameters
pyod/models/embedding.py:365
↓ 8 callersFunctionparse_nl_to_structured
Match feedback against the pattern table; return (proposed, confidence). Parameters ---------- state : InvestigationState feedback :
pyod/utils/_nl_feedback.py:363
↓ 8 callersFunctionvalidate_graph_input
Convert input to PyG Data object. Accepts: - PyG ``Data`` object (returned as-is) - numpy ``X`` (n_nodes, n_features) + numpy ``edge_inde
pyod/models/_pyg_utils.py:7
↓ 7 callersFunction_make_aged_detector
Return a deep copy of ``detector`` with each ``tree_`` replaced by an ``_OldDtypeTree`` shim. The shim ages the nodes array via ``transform``
pyod/test/test_persistence.py:174
↓ 7 callersMethod_state_with_results
Build a minimal state-like object for the parser.
pyod/test/test_ad_engine_v3.py:539
↓ 7 callersFunction_summarize
Write mean and std over frames for each row of a feature matrix.
pyod/utils/encoders/audio.py:65
↓ 7 callersMethod_tmp
(self, name='artifact.joblib')
pyod/test/test_persistence.py:775
↓ 7 callersMethod_with_contamination
Ensure plan params expose an explicit contamination value (TA2). The MCP `plan_detection` -> `build_detector` chain serializes the pl
pyod/utils/ad_engine.py:185
↓ 7 callersFunctionargmaxn
Return the index of top n elements in the list if order is set to 'desc', otherwise return the index of n smallest ones. Parameters -----
pyod/utils/utility.py:348
↓ 7 callersFunctionaverage
Combination method to merge the outlier scores from multiple estimators by taking the average. Parameters ---------- scores : numpy a
pyod/models/combination.py:101
↓ 7 callersMethodexplain_detector
Explain a detector. Parameters ---------- name : str Detector short name (e.g. 'ECOD'). Returns
pyod/utils/ad_engine.py:1852
↓ 7 callersMethodfit
Fit the detector on graph data. Parameters ---------- X : Data or array-like y : ignored edge_index : a
pyod/models/pyg_guide.py:76
↓ 7 callersMethodfit
Fit the k-Shape anomaly detector on time series data. Parameters ---------- X : array-like of shape (n_timestamps,) or (n_tim
pyod/models/ts_kshape.py:379
↓ 7 callersMethodgenerate_report
Generate a summary report. Parameters ---------- result : dict Output of run_detection(). analysis : dict
pyod/utils/ad_engine.py:1018
↓ 7 callersFunctionget_criterion_by_name
Get criterion by name Parameters ---------- name : str Loss function name. Available functions: 'mse', 'mae', 'bce'.
pyod/utils/torch_utility.py:270
↓ 7 callersFunctioninit_weights
Initialize weights for a layer Parameters ---------- layer : torch.nn.Module Layer to be initialized. name : str, optio
pyod/utils/torch_utility.py:311
↓ 7 callersFunctionmap_scores_to_timestamps
Map window-level scores back to per-timestamp scores. Parameters ---------- window_scores : np.ndarray of shape (n_windows,) window_s
pyod/models/_ts_utils.py:50
next →1–100 of 2,677, ranked by callers