Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
0
02450students
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
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
02450
02450students
Commits
5866d4cd
Commit
5866d4cd
authored
1 month ago
by
bjje
Browse files
Options
Downloads
Patches
Plain Diff
name changes ex4
parent
b2799b12
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
exercises/02450Toolbox_Python/Scripts/ex2_1_2.py
+1
-1
1 addition, 1 deletion
exercises/02450Toolbox_Python/Scripts/ex2_1_2.py
exercises/02450Toolbox_Python/Scripts/ex2_4_3.py
+3
-1
3 additions, 1 deletion
exercises/02450Toolbox_Python/Scripts/ex2_4_3.py
with
4 additions
and
2 deletions
exercises/02450Toolbox_Python/Scripts/ex2_1_2.py
+
1
−
1
View file @
5866d4cd
# exercise 2.1.
1
# exercise 2.1.
2
import
numpy
as
np
x
=
np
.
array
([
-
0.68
,
-
2.11
,
2.39
,
0.26
,
1.46
,
1.33
,
1.03
,
-
0.41
,
-
0.33
,
0.47
])
...
...
This diff is collapsed.
Click to expand it.
exercises/02450Toolbox_Python/Scripts/ex2_4_3.py
+
3
−
1
View file @
5866d4cd
...
...
@@ -121,6 +121,8 @@ print("Distance after scaling all attributes: %s \n\n" % dist_firstandlast)
# Try to change the scale of one of the attributes in both wines and see the effect on the distance
x_red
=
np
.
copy
(
X
[
0
,:])
x_white
=
np
.
copy
(
X
[
-
1
,:])
print
(
"
x_red: %s
"
%
x_red
)
print
(
"
x_white: %s
"
%
x_white
)
sf
=
1000
x_white
[
1
]
=
sf
*
x_white
[
1
]
x_red
[
1
]
=
sf
*
x_red
[
1
]
...
...
@@ -253,5 +255,5 @@ raise NotImplementedError()
#%%
print
(
"
You are now done with this exercise. A
S
k your TA to look over your solutions and discuss your findings with them.
"
)
#%%
print
(
"
You are now done with this exercise. A
s
k your TA to look over your solutions and discuss your findings with them.
"
)
#%%
# %%
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