AI Slop Code Risk Monitor

apachecn/ailearning

SlopCodeMonitor badge for apachecn/ailearning Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

AiLearning:数据分析+机器学习实战+线性代数+PyTorch+NLTK+TF2

13.7 Moderate pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for apachecn/ailearning, a Python project with 42,650 GitHub stars. SynthScan examined 117,704 lines of code across 478 source files, recording 572 pattern matches distributed across 15 syntactic categories. The legacy adjusted pattern signal is 13.7 (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.

13.7
Adjusted Signal
13.7
Raw Pattern Score
100%
Time Factor
2024-11-12
Last Push
42.6K
Stars
Python
Language
117.7K
Lines of Code
478
Files
572
Pattern Hits
2026-11-27
Scan Date
0.50
HC Hit Rate

Risk Review · Payload v1

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

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-11-27.

Cognitive Ownership Risk 10.3/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 6.5/100 · LOW

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

Agent Over-Engineering Ratio 40.3/100 · MEDIUM

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

PR Review Velocity Impact 54.5/100 · HIGH

Which changes need focused human review? 572 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 1HIGH 240MEDIUM 35LOW 296

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 572 distinct pattern matches across 15 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.

Cross-File Repetition224 hits · 1120 pts
SeverityFileLineSnippetContext
HIGHdocs/misc/AI常用函数说明.md0# numpy 矩阵和数组的区别 numpy存在2中不同的数据类型: 1. 矩阵 matrix 2. 数组 array 相似点: 都可以处理行列表示的数字元素 不同点: 1. 2个数据类型上执行相同的数据运算可能得到不同的结果。 2. nuSTRING
HIGHtutorials/AI常用函数说明.md0# numpy 矩阵和数组的区别 numpy存在2中不同的数据类型: 1. 矩阵 matrix 2. 数组 array 相似点: 都可以处理行列表示的数字元素 不同点: 1. 2个数据类型上执行相同的数据运算可能得到不同的结果。 2. nuSTRING
HIGHsrc/py2.x/ml/1.MLFoundation/NumPy.py0# numpy 矩阵和数组的区别 numpy存在2中不同的数据类型: 1. 矩阵 matrix 2. 数组 array 相似点: 都可以处理行列表示的数字元素 不同点: 1. 2个数据类型上执行相同的数据运算可能得到不同的结果。 2. nuSTRING
HIGHsrc/py3.x/ml/1.MLFoundation/NumPy.py0# numpy 矩阵和数组的区别 numpy存在2中不同的数据类型: 1. 矩阵 matrix 2. 数组 array 相似点: 都可以处理行列表示的数字元素 不同点: 1. 2个数据类型上执行相同的数据运算可能得到不同的结果。 2. nuSTRING
HIGHdocs/misc/AI常用函数说明.md0.i 表示对矩阵求逆(可以利用矩阵的初等变换) 意义: 逆矩阵是一个判断相似性的工具。逆矩阵a与列向量p相乘后,将得到列向量q,q的第i个分量表示p与a的第i个列向量的相似度。 参考案例链接: https://www.zhihu.com/qSTRING
HIGHtutorials/AI常用函数说明.md0.i 表示对矩阵求逆(可以利用矩阵的初等变换) 意义: 逆矩阵是一个判断相似性的工具。逆矩阵a与列向量p相乘后,将得到列向量q,q的第i个分量表示p与a的第i个列向量的相似度。 参考案例链接: https://www.zhihu.com/qSTRING
HIGHsrc/py2.x/ml/1.MLFoundation/NumPy.py0.i 表示对矩阵求逆(可以利用矩阵的初等变换) 意义: 逆矩阵是一个判断相似性的工具。逆矩阵a与列向量p相乘后,将得到列向量q,q的第i个分量表示p与a的第i个列向量的相似度。 参考案例链接: https://www.zhihu.com/qSTRING
HIGHsrc/py3.x/ml/1.MLFoundation/NumPy.py0.i 表示对矩阵求逆(可以利用矩阵的初等变换) 意义: 逆矩阵是一个判断相似性的工具。逆矩阵a与列向量p相乘后,将得到列向量q,q的第i个分量表示p与a的第i个列向量的相似度。 参考案例链接: https://www.zhihu.com/qSTRING
HIGHdocs/da/110.md0random boolean distributed according to p, less than p will be trueSTRING
HIGHdocs/da/111.md0random boolean distributed according to p, less than p will be trueSTRING
HIGHdocs/da/109.md0random boolean distributed according to p, less than p will be trueSTRING
HIGHdocs/da/107.md0random boolean distributed according to p, less than p will be trueSTRING
HIGHdocs/ml/5.md0y的由来,卧槽,是不是没看懂? 首先理论上是这个样子的。 datamat.append([1.0, float(linearr[0]), float(linearr[1])]) w0*x0+w1*x1+w2*x2=f(x) x0最开始就设置STRING
HIGHsrc/py2.x/ml/5.Logistic/logistic.py0y的由来,卧槽,是不是没看懂? 首先理论上是这个样子的。 datamat.append([1.0, float(linearr[0]), float(linearr[1])]) w0*x0+w1*x1+w2*x2=f(x) x0最开始就设置STRING
HIGHsrc/py3.x/ml/5.Logistic/logistic.py0y的由来,卧槽,是不是没看懂? 首先理论上是这个样子的。 datamat.append([1.0, float(linearr[0]), float(linearr[1])]) w0*x0+w1*x1+w2*x2=f(x) x0最开始就设置STRING
HIGHdocs/ml/4.md0使用算法: # 将乘法转换为加法 乘法: p(c|f1f2...fn) = p(f1f2...fn|c)p(c)/p(f1f2...fn) 加法: p(f1|c)*p(f2|c)....p(fn|c)p(c) -> log(p(f1|c))STRING
HIGHsrc/py2.x/ml/4.NaiveBayes/bayes.py0使用算法: # 将乘法转换为加法 乘法: p(c|f1f2...fn) = p(f1f2...fn|c)p(c)/p(f1f2...fn) 加法: p(f1|c)*p(f2|c)....p(fn|c)p(c) -> log(p(f1|c))STRING
HIGHsrc/py3.x/ml/4.NaiveBayes/bayes.py0使用算法: # 将乘法转换为加法 乘法: p(c|f1f2...fn) = p(f1f2...fn|c)p(c)/p(f1f2...fn) 加法: p(f1|c)*p(f2|c)....p(fn|c)p(c) -> log(p(f1|c))STRING
HIGHdocs/ml/13.md0pca args: datamat 原数据集矩阵 topnfeat 应用的n个特征 returns: lowddatamat 降维后数据集 reconmat 新的数据集空间STRING
HIGHsrc/py2.x/ml/13.PCA/pca.py0pca args: datamat 原数据集矩阵 topnfeat 应用的n个特征 returns: lowddatamat 降维后数据集 reconmat 新的数据集空间STRING
HIGHsrc/py3.x/ml/13.PCA/pca.py0pca args: datamat 原数据集矩阵 topnfeat 应用的n个特征 returns: lowddatamat 降维后数据集 reconmat 新的数据集空间STRING
HIGHdocs/ml/13.md0方差: (一维)度量两个随机变量关系的统计量 协方差: (二维)度量各个维度偏离其均值的程度 协方差矩阵: (多维)度量各个维度偏离其均值的程度 当 cov(x, y)>0时,表明x与y正相关;(x越大,y也越大;x越小y,也越小。这种情况STRING
HIGHsrc/py2.x/ml/13.PCA/pca.py0方差: (一维)度量两个随机变量关系的统计量 协方差: (二维)度量各个维度偏离其均值的程度 协方差矩阵: (多维)度量各个维度偏离其均值的程度 当 cov(x, y)>0时,表明x与y正相关;(x越大,y也越大;x越小y,也越小。这种情况STRING
HIGHsrc/py3.x/ml/13.PCA/pca.py0方差: (一维)度量两个随机变量关系的统计量 协方差: (二维)度量各个维度偏离其均值的程度 协方差矩阵: (多维)度量各个维度偏离其均值的程度 当 cov(x, y)>0时,表明x与y正相关;(x越大,y也越大;x越小y,也越小。这种情况STRING
HIGHdocs/ml/13.md0>>> x = np.array([3, 1, 2]) >>> np.argsort(x) array([1, 2, 0]) # index,1 = 1; index,2 = 2; index,0 = 3 >>> y = np.argsorSTRING
HIGHsrc/py2.x/ml/13.PCA/pca.py0>>> x = np.array([3, 1, 2]) >>> np.argsort(x) array([1, 2, 0]) # index,1 = 1; index,2 = 2; index,0 = 3 >>> y = np.argsorSTRING
HIGHsrc/py3.x/ml/13.PCA/pca.py0>>> x = np.array([3, 1, 2]) >>> np.argsort(x) array([1, 2, 0]) # index,1 = 1; index,2 = 2; index,0 = 3 >>> y = np.argsorSTRING
HIGHdocs/ml/9.md0binsplitdataset(将数据集,按照feature列的value进行 二元切分) description: 在给定特征和特征值的情况下,该函数通过数组过滤方式将上述数据集合切分得到两个子集并返回。 args: datamat 数据STRING
HIGHsrc/py2.x/ml/9.RegTrees/regTrees.py0binsplitdataset(将数据集,按照feature列的value进行 二元切分) description: 在给定特征和特征值的情况下,该函数通过数组过滤方式将上述数据集合切分得到两个子集并返回。 args: datamat 数据STRING
HIGHsrc/py3.x/ml/9.RegTrees/regTrees.py0binsplitdataset(将数据集,按照feature列的value进行 二元切分) description: 在给定特征和特征值的情况下,该函数通过数组过滤方式将上述数据集合切分得到两个子集并返回。 args: datamat 数据STRING
HIGHdocs/ml/9.md0choosebestsplit(用最佳方式切分数据集 和 生成相应的叶节点) args: dataset 加载的原始数据集 leaftype 建立叶子点的函数 errtype 误差计算函数(求总方差) ops [容许误差下降值,切分的最少样STRING
HIGHsrc/py2.x/ml/9.RegTrees/regTrees.py0choosebestsplit(用最佳方式切分数据集 和 生成相应的叶节点) args: dataset 加载的原始数据集 leaftype 建立叶子点的函数 errtype 误差计算函数(求总方差) ops [容许误差下降值,切分的最少样STRING
HIGHsrc/py3.x/ml/9.RegTrees/regTrees.py0choosebestsplit(用最佳方式切分数据集 和 生成相应的叶节点) args: dataset 加载的原始数据集 leaftype 建立叶子点的函数 errtype 误差计算函数(求总方差) ops [容许误差下降值,切分的最少样STRING
HIGHdocs/ml/9.md0createtree(获取回归树) description: 递归函数: 如果构建的是回归树,该模型是一个常数,如果是模型树,其模型师一个线性方程。 args: dataset 加载的原始数据集 leaftype 建立叶子点的函数 errtSTRING
HIGHsrc/py2.x/ml/9.RegTrees/regTrees.py0createtree(获取回归树) description: 递归函数: 如果构建的是回归树,该模型是一个常数,如果是模型树,其模型师一个线性方程。 args: dataset 加载的原始数据集 leaftype 建立叶子点的函数 errtSTRING
HIGHsrc/py3.x/ml/9.RegTrees/regTrees.py0createtree(获取回归树) description: 递归函数: 如果构建的是回归树,该模型是一个常数,如果是模型树,其模型师一个线性方程。 args: dataset 加载的原始数据集 leaftype 建立叶子点的函数 errtSTRING
HIGHdocs/ml/9.md0desc: 测试输入变量是否是一棵树,即是否是一个字典 args: obj -- 输入变量 returns: 返回布尔类型的结果。如果 obj 是一个字典,返回true,否则返回 falseSTRING
HIGHsrc/py2.x/ml/9.RegTrees/regTrees.py0desc: 测试输入变量是否是一棵树,即是否是一个字典 args: obj -- 输入变量 returns: 返回布尔类型的结果。如果 obj 是一个字典,返回true,否则返回 falseSTRING
HIGHsrc/py3.x/ml/9.RegTrees/regTrees.py0desc: 测试输入变量是否是一棵树,即是否是一个字典 args: obj -- 输入变量 returns: 返回布尔类型的结果。如果 obj 是一个字典,返回true,否则返回 falseSTRING
HIGHdocs/ml/9.md0desc: 从上往下遍历树直到叶节点为止,如果找到两个叶节点则计算它们的平均值。 对 tree 进行塌陷处理,即返回树平均值。 args: tree -- 输入的树 returns: 返回 tree 节点的平均值STRING
HIGHsrc/py2.x/ml/9.RegTrees/regTrees.py0desc: 从上往下遍历树直到叶节点为止,如果找到两个叶节点则计算它们的平均值。 对 tree 进行塌陷处理,即返回树平均值。 args: tree -- 输入的树 returns: 返回 tree 节点的平均值STRING
HIGHsrc/py3.x/ml/9.RegTrees/regTrees.py0desc: 从上往下遍历树直到叶节点为止,如果找到两个叶节点则计算它们的平均值。 对 tree 进行塌陷处理,即返回树平均值。 args: tree -- 输入的树 returns: 返回 tree 节点的平均值STRING
HIGHdocs/ml/9.md0desc: 从上而下找到叶节点,用测试数据集来判断将这些叶节点合并是否能降低测试误差 args: tree -- 待剪枝的树 testdata -- 剪枝所需要的测试数据 testdata returns: tree -- 剪枝完成的树STRING
HIGHsrc/py2.x/ml/9.RegTrees/regTrees.py0desc: 从上而下找到叶节点,用测试数据集来判断将这些叶节点合并是否能降低测试误差 args: tree -- 待剪枝的树 testdata -- 剪枝所需要的测试数据 testdata returns: tree -- 剪枝完成的树STRING
HIGHsrc/py3.x/ml/9.RegTrees/regTrees.py0desc: 从上而下找到叶节点,用测试数据集来判断将这些叶节点合并是否能降低测试误差 args: tree -- 待剪枝的树 testdata -- 剪枝所需要的测试数据 testdata returns: tree -- 剪枝完成的树STRING
HIGHdocs/ml/9.md0desc: 当数据不再需要切分的时候,生成叶节点的模型。 args: dataset -- 输入数据集 returns: 调用 linearsolve 函数,返回得到的 回归系数wsSTRING
HIGHsrc/py2.x/ml/9.RegTrees/regTrees.py0desc: 当数据不再需要切分的时候,生成叶节点的模型。 args: dataset -- 输入数据集 returns: 调用 linearsolve 函数,返回得到的 回归系数wsSTRING
HIGHsrc/py3.x/ml/9.RegTrees/regTrees.py0desc: 当数据不再需要切分的时候,生成叶节点的模型。 args: dataset -- 输入数据集 returns: 调用 linearsolve 函数,返回得到的 回归系数wsSTRING
HIGHdocs/ml/9.md0desc: 在给定数据集上计算误差。 args: dataset -- 输入数据集 returns: 调用 linearsolve 函数,返回 yhat 和 y 之间的平方误差。STRING
HIGHsrc/py2.x/ml/9.RegTrees/regTrees.py0desc: 在给定数据集上计算误差。 args: dataset -- 输入数据集 returns: 调用 linearsolve 函数,返回 yhat 和 y 之间的平方误差。STRING
HIGHsrc/py3.x/ml/9.RegTrees/regTrees.py0desc: 在给定数据集上计算误差。 args: dataset -- 输入数据集 returns: 调用 linearsolve 函数,返回 yhat 和 y 之间的平方误差。STRING
HIGHdocs/ml/9.md0desc: 将数据集格式化成目标变量y和自变量x,执行简单的线性回归,得到ws args: dataset -- 输入数据 returns: ws -- 执行线性回归的回归系数 x -- 格式化自变量x y -- 格式化目标变量ySTRING
HIGHsrc/py2.x/ml/9.RegTrees/regTrees.py0desc: 将数据集格式化成目标变量y和自变量x,执行简单的线性回归,得到ws args: dataset -- 输入数据 returns: ws -- 执行线性回归的回归系数 x -- 格式化自变量x y -- 格式化目标变量ySTRING
HIGHsrc/py3.x/ml/9.RegTrees/regTrees.py0desc: 将数据集格式化成目标变量y和自变量x,执行简单的线性回归,得到ws args: dataset -- 输入数据 returns: ws -- 执行线性回归的回归系数 x -- 格式化自变量x y -- 格式化目标变量ySTRING
HIGHdocs/ml/9.md0desc: 对 回归树 进行预测 args: model -- 指定模型,可选值为 回归树模型 或者 模型树模型,这里为回归树 indat -- 输入的测试数据 returns: float(model) -- 将输入的模型数据转换为 浮点STRING
HIGHsrc/py2.x/ml/9.RegTrees/regTrees.py0desc: 对 回归树 进行预测 args: model -- 指定模型,可选值为 回归树模型 或者 模型树模型,这里为回归树 indat -- 输入的测试数据 returns: float(model) -- 将输入的模型数据转换为 浮点STRING
HIGHsrc/py3.x/ml/9.RegTrees/regTrees.py0desc: 对 回归树 进行预测 args: model -- 指定模型,可选值为 回归树模型 或者 模型树模型,这里为回归树 indat -- 输入的测试数据 returns: float(model) -- 将输入的模型数据转换为 浮点STRING
HIGHdocs/ml/9.md0desc: 对 模型树 进行预测 args: model -- 输入模型,可选值为 回归树模型 或者 模型树模型,这里为模型树模型,实则为 回归系数 indat -- 输入的测试数据 returns: float(x * model) --STRING
HIGHsrc/py3.x/ml/9.RegTrees/regTrees.py0desc: 对 模型树 进行预测 args: model -- 输入模型,可选值为 回归树模型 或者 模型树模型,这里为模型树模型,实则为 回归系数 indat -- 输入的测试数据 returns: float(x * model) --STRING
HIGHsrc/py2.x/ml/9.RegTrees/regTrees.py0desc: 对 模型树 进行预测 args: model -- 输入模型,可选值为 回归树模型 或者 模型树模型,这里为模型树模型,实则为 回归系数 indat -- 输入的测试数据 returns: float(x * model) --STRING
164 more matches not shown…
Unused Imports142 hits · 142 pts
SeverityFileLineSnippetContext
LOWtutorials/keras/text_NER.py3CODE
LOWtutorials/keras/text_NER.py4CODE
LOWtutorials/keras/text_NER.py6CODE
LOWtutorials/RecommenderSystems/rs_content_demo.py16CODE
LOWtutorials/RecommenderSystems/rs_rating_demo.py10CODE
LOWtutorials/RecommenderSystems/rs_rating_demo.py20CODE
LOWtutorials/RecommenderSystems/rs_rating_demo.py20CODE
LOWsrc/script.py2CODE
LOWsrc/py2.x/ml/11.Apriori/apriori.py11CODE
LOWsrc/py2.x/ml/11.Apriori/apriori.py13CODE
LOWsrc/py2.x/ml/13.PCA/pca.py10CODE
LOWsrc/py2.x/ml/13.PCA/pca.py11CODE
LOWsrc/py2.x/ml/8.Regression/regression.py9CODE
LOWsrc/py2.x/ml/8.Regression/regression.py11CODE
LOWsrc/py2.x/ml/8.Regression/sklearn-regression-demo.py10CODE
LOWsrc/py2.x/ml/7.RandomForest/randomForest.py14CODE
LOWsrc/py2.x/ml/6.SVM/svm-complete.py11CODE
LOWsrc/py2.x/ml/6.SVM/svm-complete.py12CODE
LOWsrc/py2.x/ml/6.SVM/svm-complete_Non-Kernel.py11CODE
LOWsrc/py2.x/ml/6.SVM/svm-complete_Non-Kernel.py12CODE
LOWsrc/py2.x/ml/6.SVM/svm-simple.py11CODE
LOWsrc/py2.x/ml/6.SVM/svm-simple.py12CODE
LOWsrc/py2.x/ml/6.SVM/sklearn-svm-demo.py12CODE
LOW…py2.x/ml/5.Logistic/sklearn_logisticRegression_demo.py182CODE
LOWsrc/py2.x/ml/5.Logistic/logistic.py10CODE
LOWsrc/py2.x/ml/5.Logistic/logistic.py11CODE
LOWsrc/py2.x/ml/4.NaiveBayes/sklearn-nb-demo.py11CODE
LOWsrc/py2.x/ml/4.NaiveBayes/bayes.py9CODE
LOWsrc/py2.x/ml/4.NaiveBayes/bayes.py10CODE
LOWsrc/py2.x/ml/4.NaiveBayes/bayes.py300CODE
LOWsrc/py2.x/ml/1.MLFoundation/NumPy.py10CODE
LOWsrc/py2.x/ml/7.AdaBoost/adaboost.py11CODE
LOWsrc/py2.x/ml/7.AdaBoost/adaboost.py12CODE
LOWsrc/py2.x/ml/7.AdaBoost/sklearn-adaboost-demo.py10CODE
LOWsrc/py2.x/ml/10.kmeans/kMeans.py10CODE
LOWsrc/py2.x/ml/10.kmeans/kMeans.py11CODE
LOWsrc/py2.x/ml/9.RegTrees/regTrees.py10CODE
LOWsrc/py2.x/ml/9.RegTrees/regTrees.py12CODE
LOWsrc/py2.x/ml/9.RegTrees/RTSklearn.py65CODE
LOWsrc/py2.x/ml/9.RegTrees/sklearn-regressTree-demo.py11CODE
LOWsrc/py2.x/ml/9.RegTrees/treeExplore.py11CODE
LOWsrc/py2.x/ml/9.RegTrees/treeExplore.py13CODE
LOWsrc/py2.x/ml/9.RegTrees/treeExplore.py14CODE
LOWsrc/py2.x/ml/12.FrequentPattemTree/fpGrowth.py15CODE
LOWsrc/py2.x/ml/2.KNN/sklearn-knn-demo.py11CODE
LOWsrc/py2.x/ml/2.KNN/sklearn-knn-demo.py16CODE
LOWsrc/py2.x/ml/2.KNN/sklearn-knn-demo.py18CODE
LOWsrc/py2.x/ml/2.KNN/kNN.py9CODE
LOWsrc/py2.x/ml/2.KNN/kNN.py10CODE
LOWsrc/py2.x/ml/2.KNN/kNN.py12CODE
LOWsrc/py2.x/ml/2.KNN/kNN.py14CODE
LOWsrc/py2.x/ml/15.BigData_MapReduce/mrMeanMapper.py11CODE
LOWsrc/py2.x/ml/15.BigData_MapReduce/proximalSVM.py9CODE
LOWsrc/py2.x/ml/15.BigData_MapReduce/py27dbg.py9CODE
LOWsrc/py2.x/ml/15.BigData_MapReduce/py27dbg.py10CODE
LOWsrc/py2.x/ml/15.BigData_MapReduce/mrSVM.py14CODE
LOWsrc/py2.x/ml/15.BigData_MapReduce/pegasos.py9CODE
LOWsrc/py2.x/ml/15.BigData_MapReduce/pegasos.py10CODE
LOWsrc/py2.x/ml/15.BigData_MapReduce/pegasos.py87CODE
LOWsrc/py2.x/ml/15.BigData_MapReduce/mrSVMkickStart.py6CODE
82 more matches not shown…
Over-Commented Block93 hits · 93 pts
SeverityFileLineSnippetContext
LOWrun_example.py1# import tutorials.keras.text_NER as ftCOMMENT
LOWdocs/misc/反向传递.md381COMMENT
LOWdocs/da/001.md1# 01\. Python 工具COMMENT
LOWdocs/da/100.md1# 08\. 面向对象编程COMMENT
LOWdocs/da/134.md1# 10\. 有趣的第三方模块COMMENT
LOWdocs/da/114.md1# 09\. Theano 基础COMMENT
LOWdocs/da/150.md1# 12\. PandasCOMMENT
LOWdocs/da/128.md101 # X: 128 * 1 * 28 * 28COMMENT
LOWdocs/da/128.md121COMMENT
LOWdocs/da/028.md1# 03\. NumpyCOMMENT
LOWdocs/da/139.md1# 11\. 有用的工具COMMENT
LOWdocs/da/091.md1# 07\. 使用其他语言进行扩展COMMENT
LOWdocs/da/052.md1# 04\. ScipyCOMMENT
LOWdocs/da/006.md1# 02\. Python 基础COMMENT
LOWdocs/da/063.md1# 05\. Python 进阶COMMENT
LOWdocs/da/133.md61 # valid modeCOMMENT
LOWdocs/da/080.md1# 06\. MatplotlibCOMMENT
LOWdocs/ml/5.md221 labelMat = mat(classLabels).transpose() # 首先将数组转换为 NumPy 矩阵,然后再将行向量转置为列向量COMMENT
LOWdocs/ml/5.md481 alpha = 0.001COMMENT
LOWdocs/ml/9.md181 tolN = ops[1]COMMENT
LOWdocs/pytorch/08.md1# 建造第一个神经网络COMMENT
LOWdocs/pytorch/22.md1# 高阶内容COMMENT
LOWdocs/pytorch/04.md1# PyTorch 神经网络基础COMMENT
LOWdocs/pytorch/15.md1# 高级神经网络结构COMMENT
LOWdocs/pytorch/01.md1# PyTorch 简介COMMENT
LOWtutorials/RecommenderSystems/rs_content_demo.py301 # 1. 交易数据比较少COMMENT
LOWtutorials/RecommenderSystems/rs_rating_demo.py221COMMENT
LOWsrc/py2.x/ml/11.Apriori/apriori.py341COMMENT
LOWsrc/py2.x/ml/11.Apriori/apriori.py361 # # 找出关于2的频繁子项出来,就知道如果是毒蘑菇,那么出现频繁的也可能是毒蘑菇COMMENT
LOWsrc/py2.x/ml/13.PCA/pca.py141 # # 只需要2个特征向量,和原始数据一致,没任何变化COMMENT
LOWsrc/py2.x/ml/8.Regression/regression.py261 if rssE < lowestError:COMMENT
LOWsrc/py2.x/ml/8.Regression/regression.py281 # soldUnicde = currentRow[0].findAll('td')[3].findAll('span')COMMENT
LOWsrc/py2.x/ml/8.Regression/regression.py601 regression1()COMMENT
LOWsrc/py2.x/ml/6.SVM/svm-complete.py141 j 随机选出的第j一行COMMENT
LOWsrc/py2.x/ml/6.SVM/svm-complete.py521 print(dataArr[i], labelArr[i])COMMENT
LOWsrc/py2.x/ml/5.Logistic/logistic.py81 for k in range(maxCycles): # heavy on matrix operationsCOMMENT
LOWsrc/py2.x/ml/7.AdaBoost/adaboost.py161 # 分类错误: 乘积为 -1,结果会受影响,所以也乘以 -1COMMENT
LOWsrc/py2.x/ml/7.AdaBoost/adaboost.py281 # # print 'minError=', minErrorCOMMENT
LOWsrc/py2.x/ml/7.AdaBoost/sklearn-adaboost-demo.py61# print "-" * 100COMMENT
LOWsrc/py2.x/ml/9.RegTrees/regTrees.py101 # .T 对数据集进行转置COMMENT
LOWsrc/py2.x/ml/9.RegTrees/regTrees.py421COMMENT
LOWsrc/py2.x/ml/9.RegTrees/regTrees.py441COMMENT
LOWsrc/py2.x/ml/9.RegTrees/regTrees.py461 # # 线性回归COMMENT
LOWsrc/py2.x/ml/9.RegTrees/RTSklearn.py1#!/usr/bin/pythonCOMMENT
LOWsrc/py2.x/ml/9.RegTrees/RTSklearn.py21# rng = np.random.RandomState(1)COMMENT
LOWsrc/py2.x/ml/9.RegTrees/sklearn-regressTree-demo.py21# 参考 https://docs.scipy.org/doc/numpy-1.6.0/reference/generated/numpy.random.mtrand.RandomState.htmlCOMMENT
LOWsrc/py2.x/ml/12.FrequentPattemTree/fpGrowth.py241 myCondTree.disp(1)COMMENT
LOWsrc/py2.x/ml/12.FrequentPattemTree/fpGrowth.py261# api = twitter.Api(consumer_key=CONSUMER_KEY, consumer_secret=CONSUMER_SECRET, access_token_key=ACCESS_TOKEN_KEY, aCOMMENT
LOWsrc/py2.x/ml/12.FrequentPattemTree/fpGrowth.py281COMMENT
LOWsrc/py2.x/ml/12.FrequentPattemTree/fpGrowth.py321 print('r --->', findPrefixPath('r', myHeaderTab['r'][1]))COMMENT
LOWsrc/py2.x/ml/12.FrequentPattemTree/fpGrowth.py341COMMENT
LOWsrc/py2.x/ml/2.KNN/sklearn-knn-demo.py21COMMENT
LOWsrc/py2.x/ml/2.KNN/kNN.py81 # argsort() 是将x中的元素从小到大排列,提取其对应的index(索引),然后输出到y。COMMENT
LOWsrc/py2.x/ml/2.KNN/kNN.py101 # 例如: dict = {'Name': 'Zara', 'Age': 7} print "Value : %s" % dict.items() Value : [('Age', 7), ('Name', 'Zara')COMMENT
LOWsrc/py2.x/ml/2.KNN/kNN.py121 # ...COMMENT
LOWsrc/py2.x/ml/14.SVD/svdRecommend.py301 printMat(reconMat, thresh)COMMENT
LOW…py2.x/ml/3.DecisionTree/skelearn_dts_regressor_demo.py21# 参考 https://docs.scipy.org/doc/numpy-1.6.0/reference/generated/numpy.random.mtrand.RandomState.htmlCOMMENT
LOWsrc/py2.x/ml/3.DecisionTree/DecisionTree.py181COMMENT
LOWsrc/py3.x/ml/11.Apriori/apriori.py341 # # 构建美国国会投票记录的事务数据集COMMENT
LOWsrc/py3.x/ml/13.PCA/pca.py141 # # 只需要2个特征向量,和原始数据一致,没任何变化COMMENT
33 more matches not shown…
Docstring Block Structure14 hits · 70 pts
SeverityFileLineSnippetContext
HIGHdocs/ml/9.md137binSplitDataSet(将数据集,按照feature列的value进行 二元切分) Description: 在给定特征和特征值的情况下,该函数通过数组过滤方式将上述数据集合切分得到两个子集并返回。 ArgsSTRING
HIGHdocs/ml/9.md163chooseBestSplit(用最佳方式切分数据集 和 生成相应的叶节点) Args: dataSet 加载的原始数据集 leafType 建立叶子点的函数 errType STRING
HIGHdocs/ml/8.md241 Description: 局部加权线性回归,在待预测点附近的每个点赋予一定的权重,在子集上基于最小均方差来进行普通的回归。 Args: testPointSTRING
HIGHsrc/py2.x/ml/8.Regression/regression.py73 Description: 局部加权线性回归,在待预测点附近的每个点赋予一定的权重,在子集上基于最小均方差来进行普通的回归。 Args: testPointSTRING
HIGHsrc/py2.x/ml/9.RegTrees/regTrees.py18loadDataSet(解析每一行,并转化为float类型) Desc: 该函数读取一个以 tab 键为分隔符的文件,然后将每行的内容保存成一组浮点数 Args: fileName 文件名 RSTRING
HIGHsrc/py2.x/ml/9.RegTrees/regTrees.py41binSplitDataSet(将数据集,按照feature列的value进行 二元切分) Description: 在给定特征和特征值的情况下,该函数通过数组过滤方式将上述数据集合切分得到两个子集并返回。 ArgsSTRING
HIGHsrc/py2.x/ml/9.RegTrees/regTrees.py81chooseBestSplit(用最佳方式切分数据集 和 生成相应的叶节点) Args: dataSet 加载的原始数据集 leafType 建立叶子点的函数 errType STRING
HIGHsrc/py3.x/ml/8.Regression/regression.py76 Description: 局部加权线性回归,在待预测点附近的每个点赋予一定的权重,在子集上基于最小均方差来进行普通的回归。 Args: testPointSTRING
HIGHsrc/py3.x/ml/9.RegTrees/regTrees.py17loadDataSet(解析每一行,并转化为float类型) Desc: 该函数读取一个以 tab 键为分隔符的文件,然后将每行的内容保存成一组浮点数 Args: fileName 文件名 RSTRING
HIGHsrc/py3.x/ml/9.RegTrees/regTrees.py38binSplitDataSet(将数据集,按照feature列的value进行 二元切分) Description: 在给定特征和特征值的情况下,该函数通过数组过滤方式将上述数据集合切分得到两个子集并返回。 ArgsSTRING
HIGHsrc/py3.x/ml/9.RegTrees/regTrees.py78chooseBestSplit(用最佳方式切分数据集 和 生成相应的叶节点) Args: dataSet 加载的原始数据集 leafType 建立叶子点的函数 errType STRING
HIGHsrc/tool/DecisionTree_getInfoGain.py8calcShannonEnt(calculate Shannon entropy 计算label分类标签的香农熵) Args: dataSet 数据集 Returns: 返回香农熵的计算值 STRING
HIGHsrc/tool/DecisionTree_getInfoGain.py42splitDataSet(通过遍历dataSet数据集,求出axis对应的colnum列的值为value的行) Args: dataSet 数据集 axis 表示每一行的axis列 STRING
HIGHsrc/tool/DecisionTree_getInfoGain.py69chooseBestFeatureToSplit(选择最好的特征) Args: dataSet 数据集 Returns: bestFeature 最优的特征列 Raises: STRING
Decorative Section Separators21 hits · 63 pts
SeverityFileLineSnippetContext
MEDIUMdocs/da/123.md64#=========================COMMENT
MEDIUMdocs/da/123.md76#=========================COMMENT
MEDIUMtutorials/RecommenderSystems/rs_content_demo.py3# -------------------------------------------------------------------------------COMMENT
MEDIUMtutorials/RecommenderSystems/rs_content_demo.py9# -------------------------------------------------------------------------------COMMENT
MEDIUMtutorials/RecommenderSystems/rs_rating_demo.py3# -------------------------------------------------------------------------------COMMENT
MEDIUMtutorials/RecommenderSystems/rs_rating_demo.py9# -------------------------------------------------------------------------------COMMENT
MEDIUMsrc/py2.x/ml/8.Regression/regression.py297 # --------------------------------------------------------------COMMENT
MEDIUMsrc/py2.x/ml/8.Regression/regression.py373# ----------------------------------------------------------------------------COMMENT
MEDIUMsrc/py2.x/ml/5.Logistic/logistic.py14# ---------------------------------------------------------------------------COMMENT
MEDIUMsrc/py2.x/ml/5.Logistic/logistic.py225# --------------------------------------------------------------------------------COMMENT
MEDIUMsrc/py2.x/ml/4.NaiveBayes/bayes.py201# ------------------------------------------------------------------------------------------COMMENT
MEDIUMsrc/py2.x/ml/4.NaiveBayes/bayes.py272# -----------------------------------------------------------------------------------COMMENT
MEDIUMsrc/py2.x/ml/2.KNN/kNN.py112 # ------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUMsrc/py2.x/ml/2.KNN/kNN.py148 # ------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUMsrc/py2.x/ml/2.KNN/kNN.py161# ----------------------------------------------------------------------------------------COMMENT
MEDIUMsrc/py3.x/ml/8.Regression/regression.py302# --------------------------------------------------------------COMMENT
MEDIUMsrc/py3.x/ml/8.Regression/regression.py376# ----------------------------------------------------------------------------COMMENT
MEDIUMsrc/py3.x/ml/8.Regression/regression.py384# ----------------------------------------------------------------------------COMMENT
MEDIUMsrc/py3.x/ml/2.KNN/kNN.py118 # ------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUMsrc/py3.x/ml/2.KNN/kNN.py154 # ------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUMsrc/py3.x/ml/2.KNN/kNN.py167# ----------------------------------------------------------------------------------------COMMENT
Self-Referential Comments14 hits · 42 pts
SeverityFileLineSnippetContext
MEDIUMsrc/py2.x/ml/7.RandomForest/randomForest.py135# Create a terminal node value # 输出group中出现次数较多的标签COMMENT
MEDIUMsrc/py2.x/ml/7.RandomForest/randomForest.py219# Create a random subsample from the dataset with replacementCOMMENT
MEDIUMsrc/py2.x/ml/7.AdaBoost/sklearn-adaboost-demo.py22# Create the datasetCOMMENT
MEDIUMsrc/py2.x/ml/9.RegTrees/RTSklearn.py14# # Import the necessary modules and librariesCOMMENT
MEDIUMsrc/py2.x/ml/9.RegTrees/RTSklearn.py20# # Create a random datasetCOMMENT
MEDIUMsrc/py2.x/ml/9.RegTrees/RTSklearn.py79# Create the datasetCOMMENT
MEDIUMsrc/py3.x/ml/7.RandomForest/randomForest.py109# Create a terminal node value # 输出group中出现次数较多的标签COMMENT
MEDIUMsrc/py3.x/ml/7.RandomForest/randomForest.py193# Create a random subsample from the dataset with replacementCOMMENT
MEDIUMsrc/py3.x/ml/7.AdaBoost/sklearn-adaboost-demo.py21# Create the datasetCOMMENT
MEDIUMsrc/py3.x/ml/9.RegTrees/RTSklearn.py14# # Import the necessary modules and librariesCOMMENT
MEDIUMsrc/py3.x/ml/9.RegTrees/RTSklearn.py20# # Create a random datasetCOMMENT
MEDIUMsrc/py3.x/ml/9.RegTrees/RTSklearn.py78# Create the datasetCOMMENT
MEDIUMsrc/py3.x/tensorflow2.x/overfit_and_underfit.py54 # Create an all-zero matrix of shape (len(sequences), dimension)COMMENT
MEDIUMsrc/py3.x/tensorflow2.x/overfit_and_underfit.py93# ### Create a baseline modelCOMMENT
Deep Nesting32 hits · 32 pts
SeverityFileLineSnippetContext
LOWtutorials/keras/brat_tag.py18CODE
LOWtutorials/keras/brat_tag.py57CODE
LOWtutorials/keras/text_NER.py127CODE
LOWtutorials/RecommenderSystems/rs_content_demo.py70CODE
LOWtutorials/RecommenderSystems/rs_content_demo.py98CODE
LOWsrc/py2.x/ml/11.Apriori/apriori.py44CODE
LOWsrc/py2.x/ml/11.Apriori/apriori.py240CODE
LOWsrc/py2.x/ml/11.Apriori/apriori.py264CODE
LOWsrc/py2.x/ml/8.Regression/regression.py241CODE
LOWsrc/py2.x/ml/7.RandomForest/randomForest.py19CODE
LOWsrc/py2.x/ml/6.SVM/svm-simple.py66CODE
LOWsrc/py2.x/ml/7.AdaBoost/adaboost.py65CODE
LOWsrc/py2.x/ml/10.kmeans/kMeans.py45CODE
LOWsrc/py2.x/ml/15.BigData_MapReduce/mrSVM.py64CODE
LOWsrc/py3.x/ml/11.Apriori/apriori.py42CODE
LOWsrc/py3.x/ml/11.Apriori/apriori.py238CODE
LOWsrc/py3.x/ml/11.Apriori/apriori.py262CODE
LOWsrc/py3.x/ml/8.Regression/regression.py244CODE
LOWsrc/py3.x/ml/8.Regression/regression.py310CODE
LOWsrc/py3.x/ml/7.RandomForest/randomForest.py19CODE
LOWsrc/py3.x/ml/6.SVM/svm-simple.py65CODE
LOWsrc/py3.x/ml/7.AdaBoost/adaboost.py68CODE
LOWsrc/py3.x/ml/10.kmeans/kMeans.py69CODE
LOWsrc/py3.x/ml/16.RecommenderSystems/test_基于用户.py15CODE
LOWsrc/py3.x/ml/16.RecommenderSystems/test_基于用户.py43CODE
LOWsrc/py3.x/ml/16.RecommenderSystems/RS-usercf.py92CODE
LOWsrc/py3.x/ml/16.RecommenderSystems/test_graph-based.py1CODE
LOWsrc/py3.x/ml/16.RecommenderSystems/test_基于物品.py5CODE
LOWsrc/py3.x/ml/16.RecommenderSystems/test_基于物品.py25CODE
LOWsrc/py3.x/ml/16.RecommenderSystems/RS-itemcf.py89CODE
LOWsrc/py3.x/ml/16.RecommenderSystems/test_lfm.py19CODE
LOWsrc/py3.x/ml/15.BigData_MapReduce/mrSVM.py64CODE
Hyper-Verbose Identifiers15 hits · 17 pts
SeverityFileLineSnippetContext
LOWdocs/misc/反向传递.md218 def init_weights_from_inputs_to_hidden_layer_neurons(self, hidden_layer_weights):CODE
LOWdocs/misc/反向传递.md228 def init_weights_from_hidden_layer_neurons_to_output_layer_neurons(self, output_layer_weights):CODE
LOWdocs/misc/反向传递.md344 def calculate_total_net_input(self):CODE
LOW⚡docs/misc/反向传递.md355 def calculate_pd_error_wrt_total_net_input(self, target_output):CODE
LOW⚡docs/misc/反向传递.md363 def calculate_pd_error_wrt_output(self, target_output):CODE
LOW⚡docs/misc/反向传递.md367 def calculate_pd_total_net_input_wrt_input(self):CODE
LOW⚡docs/misc/反向传递.md371 def calculate_pd_total_net_input_wrt_weight(self, index):CODE
LOWdocs/misc/CNN原理.md602def convolutional_neural_network_org(img):CODE
LOWdocs/tf2/18.md288def discount_and_normalize_rewards(all_rewards, discount_factor):CODE
LOWsrc/py2.x/dl/bp.py61 def append_downstream_connection(self, conn):CODE
LOWsrc/py2.x/dl/bp.py73 def append_upstream_connection(self, conn):CODE
LOWsrc/py2.x/dl/bp.py166 def append_downstream_connection(self, conn):CODE
LOWsrc/py3.x/dl/bp.py61 def append_downstream_connection(self, conn):CODE
LOWsrc/py3.x/dl/bp.py73 def append_upstream_connection(self, conn):CODE
LOWsrc/py3.x/dl/bp.py166 def append_downstream_connection(self, conn):CODE
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICALasset/docsify.min.js1!function(){function s(n){var r=Object.create(null);return function(e){var t=c(e)?e:JSON.stringify(e);return r[t]||(r[t]CODE
Excessive Try-Catch Wrapping10 hits · 10 pts
SeverityFileLineSnippetContext
LOWdocs/da/064.md63except Exception:CODE
LOWdocs/da/025.md186 except Exception:CODE
LOWdocs/da/025.md291 except Exception:CODE
LOWdocs/da/025.md349 except Exception as exc:CODE
LOWdocs/da/074.md485 except Exception as exc:CODE
LOWdocs/da/144.md105except Exception as msg:CODE
LOWdocs/da/027.md4118except Exception:CODE
LOWsrc/py3.x/tensorflow2.x/overfit_and_underfit.py29except Exception:CODE
LOWsrc/py3.x/tensorflow2.x/text_classification.py23except Exception:CODE
LOWsrc/py3.x/tensorflow2.x/text_regression.py31except Exception:CODE
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHsrc/script.py111 '\\n function gtag(){dataLayer.push(arguments);}'+CODE
Empty Error Handlers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHsrc/py3.x/tensorflow2.x/overfit_and_underfit.py29except Exception:CODE
Overly Generic Function Names2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtutorials/keras/text_NER.py93def process_data(data, vocab, maxlen=100):CODE
LOW…y3.x/tensorflow2.x/zh-NER-keras-master/process_data.py61def process_data(data, vocab, maxlen=100):CODE
Fake / Example Data1 hit · 1 pts
SeverityFileLineSnippetContext
LOWasset/docsify.min.js1!function(){function s(n){var r=Object.create(null);return function(e){var t=c(e)?e:JSON.stringify(e);return r[t]||(r[t]CODE
AI Structural Patterns1 hit · 1 pts
SeverityFileLineSnippetContext
LOWsrc/py3.x/tensorflow2.x/text_Emotion.py191CODE