Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion ArtificialIntelligence.qml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Rectangle {
property int rfMinSamplesLeaf: 1
property string rfMaxFeatures: "auto" // auto|sqrt|log2
property string rfCriterion: "gini" // gini|entropy
// GaussianNB params (UI state only for now)
property real gnbVarSmoothing: 1e-9

// Derived
property bool paramsEnabled: mode === "Train"
Expand Down Expand Up @@ -146,7 +148,7 @@ Rectangle {
Math.min(root.height * 0.08, 90))
radius: 8
color: "#2d7a4a"
border.color: currentModel === "GaussianNB" ? "#439566" : "#2d7a4a"
border.color: currentModel === "GaussianNB" ? "yellow" : "#2d7a4a"
border.width: currentModel === "GaussianNB" ? 3 : 1

Text {
Expand Down Expand Up @@ -993,7 +995,36 @@ Rectangle {
}
}
}
// GAUSSIAN NB PARAMS ----------------------------------
ColumnLayout {
visible: currentModel === "GaussianNB"
spacing: 6
Layout.fillWidth: true

RowLayout {
Layout.fillWidth: true
spacing: 4

Text {
text: "var_smoothing:"
color: "white"
Layout.preferredWidth: 120
font.pixelSize: Math.max(10,
Math.min(16, root.height * 0.02))
}

TextField {
text: gnbVarSmoothing.toString()
onEditingFinished: {
var v = parseFloat(text)
if (!isNaN(v) && v > 0)
gnbVarSmoothing = v
text = gnbVarSmoothing.toString()
}
Layout.fillWidth: true
}
}
}
Item { Layout.fillHeight: true } // spacer
}
}
Expand Down