Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
COMP3217-CW2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jay Caunhye
COMP3217-CW2
Commits
6ddcd515
Commit
6ddcd515
authored
2 years ago
by
Jaralus
Browse files
Options
Downloads
Patches
Plain Diff
V1
parent
a409f723
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CW2.py
+2
-0
2 additions, 0 deletions
CW2.py
tempCodeRunnerFile.py
+2
-0
2 additions, 0 deletions
tempCodeRunnerFile.py
with
4 additions
and
0 deletions
CW2.py
+
2
−
0
View file @
6ddcd515
...
...
@@ -14,6 +14,8 @@ from sklearn.ensemble import RandomForestClassifier
from
sklearn.tree
import
DecisionTreeClassifier
from
sklearn.neighbors
import
KNeighborsClassifier
#poo
def
cross_validation
(
classifier
,
features
,
labels
,
scoring_metrics
):
scores
=
cross_val_score
(
classifier
,
features
,
labels
,
cv
=
5
,
scoring
=
scoring_metrics
)
return
scores
.
mean
()
...
...
This diff is collapsed.
Click to expand it.
tempCodeRunnerFile.py
0 → 100644
+
2
−
0
View file @
6ddcd515
def
main
():
\ No newline at end of file
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