Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WS-23-SAS-02
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michael Mutote
WS-23-SAS-02
Commits
d3e758bf
Commit
d3e758bf
authored
1 year ago
by
Michael Mutote
Browse files
Options
Downloads
Patches
Plain Diff
Merge remote-tracking branch 'origin/main'
# Conflicts: DisplayWindow.py
parent
d8655b22
Branches
mansoor01
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DisplayWindow.py
+19
-3
19 additions, 3 deletions
DisplayWindow.py
with
19 additions
and
3 deletions
DisplayWindow.py
+
19
−
3
View file @
d3e758bf
...
...
@@ -64,7 +64,7 @@ class MainWindow(QMainWindow):
# Create a plot widget
graphWidget
=
pg
.
PlotWidget
(
self
)
graphWidget
.
setBackground
(
'
w
'
)
graphWidget
.
plot
(
[
1
,
2
,
3
],
[
6
,
8
,
2
])
graphWidget
.
plot
(
RegressionModel
.
diamonds
[
'
carat
'
],
RegressionModel
.
diamonds
[
'
price
'
])
# Add the plot widget to the grid layout
grid_layout
.
addWidget
(
self
.
calculate_button
,
2
,
0
,
1
,
2
)
...
...
@@ -100,14 +100,30 @@ class Advanced(QMainWindow):
# Create a grid layout and set it to the central widget
grid_layout
=
QGridLayout
(
central_widget
)
self
.
graph_selector_X
=
QComboBox
(
self
)
self
.
graph_selector_Y
=
QComboBox
(
self
)
self
.
regression_model
=
QComboBox
(
self
)
self
.
check_labels
=
[
'
Cut
'
,
'
Colour
'
,
'
Clarity
'
,
'
Carat
'
,
'
Depth
'
,
'
Table
'
,
'
X
'
,
'
Y
'
,
'
Z
'
]
self
.
graph_selector_X
.
addItems
((
self
.
check_labels
+
[
'
price
'
]))
self
.
graph_selector_Y
.
addItems
((
self
.
check_labels
+
[
'
price
'
]))
self
.
regression_model
.
addItems
([
"
Linear Regression
"
,
"
Gradient Descent
"
,
"
Random Forest
"
])
self
.
checkboxes
=
[]
grid_layout
.
addWidget
(
QLabel
(
"
select features to include in Modelling
"
),
0
,
0
)
grid_layout
.
addWidget
(
QLabel
(
"
select features to include in Modelling
"
),
0
,
0
,
1
,
0
)
# grid_layout.addWidget(self.graph_selector_X, 1, 2)
# grid_layout.addWidget(self.graph_selector_Y, 1, 3)
grid_layout
.
addWidget
(
self
.
regression_model
,
2
,
1
)
# grid_layout.addWidget(QLabel("X-PLOT", self), 0, 2)
# grid_layout.addWidget(QLabel("Y-PLOT", self), 0, 3)
grid_layout
.
addWidget
(
QLabel
(
"
Regression Model :
"
,
self
),
2
,
0
,
1
,
1
)
for
i
,
label
in
enumerate
(
self
.
check_labels
):
checkbox
=
QCheckBox
(
label
,
self
)
checkbox
.
setChecked
(
True
)
checkbox
.
stateChanged
.
connect
(
self
.
handle_checkbox_state
)
# Connect signal
grid_layout
.
addWidget
(
checkbox
,
i
,
1
)
grid_layout
.
addWidget
(
checkbox
,
1
,
i
)
self
.
checkboxes
.
append
(
checkbox
)
# Store checkboxes in the list
def
handle_checkbox_state
(
self
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment