相关实验视频
Updated: Jul 26, 2025

08:05
Design and Analysis for Fall Detection System Simplification
Published on: April 6, 2020
10.7K
使用常规机器学习模型的Python代码嗅探检测
Rana Sandouka1, Hamoud Aljamaan1
1Information and Computer Science Department, King Fahd University of Petroleum and Minerals, Dhahran, Saudi Arabia.
PeerJ. Computer science
|June 22, 2023
概括
这项研究引入了一个新的Python数据集,用于检测大类和长方法代码的气味. 机器学习模型表现出不同的性能,随机森林在大类检测和决策树在长方法检测方面表现出色.
科学领域:
- 软件工程 软件工程 软件工程
- 机器学习 机器学习
- 数据科学数据科学数据科学
背景情况:
- 代码臭味会降低软件质量,并使维护复杂化.
- 现有关于代码嗅觉检测的研究主要使用Java数据集.
- 在专门的Python代码嗅觉数据集中存在一个空白,用于机器学习.
研究的目的:
- 提出并引入一个新的Python代码气味数据集.
- 为了评估基线机器学习模型的性能,用于检测Python中大类和长方法代码的臭味.
- 为未来的Python代码嗅觉检测研究建立基准.
主要方法:
- 开发一个Python代码气味数据集,每个数据集包含大类和长方法气味的1000个样本,包含18个提取的源代码特征.
- 调查六个机器学习模型作为代码嗅觉检测的基线.
- 使用准确度和马修斯相关系数 (MCC) 评估模型性能.
主要成果:
- 随机森林模型在大型类代码气味检测方面实现了0.77的最高MCC.
- 决策树模型证明了长方法代码气味检测的最佳性能,MCC为0.89.
- 性能在不同型号和代码气味类型中各不相同,突出显示了对量身定制方法的需求.
结论:
- 开发的Python数据集为这种广泛使用的语言促进了对代码嗅觉检测的研究.
- 特定的机器学习模型显示了检测不同类型的Python代码气味的前景.
- 进一步的研究可以基于这些发现来改进Python项目中的自动化代码质量评估.
相关概念视频
Quantifying and Rejecting Outliers: The Grubbs Test
1.7K
Sometimes, a data set can have a recorded numerical observation that greatly deviates from the rest of the data. Assuming that the data is normally distributed, a statistical method called the Grubbs test can be used to determine whether the observation is truly an outlier. To perform a two-tailed Grubbs test, first, calculate the absolute difference between the outlier and the mean. Then, calculate the ratio between this difference and the standard deviation of the sample. This...
1.7K
Types of Errors: Detection and Minimization
1.7K
Error is the deviation of the obtained result from the true, expected value or the estimated central value. Errors are expressed in absolute or relative terms.
Absolute error in a measurement is the numerical difference from the true or central value. Relative error is the ratio between absolute error and the true or central value, expressed as a percentage.
Errors can be classified by source, magnitude, and sign. There are three types of errors: systematic, random, and gross.
Systematic or...
Absolute error in a measurement is the numerical difference from the true or central value. Relative error is the ratio between absolute error and the true or central value, expressed as a percentage.
Errors can be classified by source, magnitude, and sign. There are three types of errors: systematic, random, and gross.
Systematic or...
1.7K
Detection of Gross Error: The Q Test
6.3K
When one or more data points appear far from the rest of the data, there is a need to determine whether they are outliers and whether they should be eliminated from the data set to ensure an accurate representation of the measured value. In many cases, outliers arise from gross errors (or human errors) and do not accurately reflect the underlying phenomenon. In some cases, however, these apparent outliers reflect true phenomenological differences. In these cases, we can use statistical methods...
6.3K
Classification of Signals
556
In signal processing, signals are classified based on various characteristics: continuous-time versus discrete-time, periodic versus aperiodic, analog versus digital, and causal versus noncausal. Each category highlights distinct properties crucial for understanding and manipulating signals.
A continuous-time signal holds a value at every instant in time, representing information seamlessly. In contrast, a discrete-time signal holds values only at specific moments, often denoted as x(n), where...
A continuous-time signal holds a value at every instant in time, representing information seamlessly. In contrast, a discrete-time signal holds values only at specific moments, often denoted as x(n), where...
556
Goodness-of-Fit Test
3.5K
The goodness-of-fit test is a type of hypothesis test which determines whether the data "fits" a particular distribution. For example, one may suspect that some anonymous data may fit a binomial distribution. A chi-square test (meaning the distribution for the hypothesis test is chi-square) can be used to determine if there is a fit. The null and alternative hypotheses may be written in sentences or stated as equations or inequalities. The test statistic for a goodness-of-fit test is given as...
3.5K
Survival Tree
117
Survival trees are a non-parametric method used in survival analysis to model the relationship between a set of covariates and the time until an event of interest occurs, often referred to as the "time-to-event" or "survival time." This method is particularly useful when dealing with censored data, where the event has not occurred for some individuals by the end of the study period, or when the exact time of the event is unknown.
Building a Survival Tree
Constructing a...
Building a Survival Tree
Constructing a...
117

