Skip to content

CodeMaintainabilityModel

Barry Stahl edited this page Jan 13, 2025 · 2 revisions

Crafting AI - Code Maintainability Model

This Excel workbook demonstrates a model configuration for a single-layer linear perceptron model with 2 inputs. In this example, we model a silly way to identify code that may not be maintainable based on the 2 inputs, Cyclomatic Complexity and Code Coverage.

The most interesting part of this model is how the relationship between complexity and maintainability is managed. Since maintainability is inversely proportional to complexity, we chose to normalize the complexity input values by inverting and scaling them appropriately. In models being trained, we might allow the training process to determine this relationship.

2-Input Perceptron

Clone this wiki locally