Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Demonstrating Data to Knowledge Pipelines
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Leon Michel Gorißen
Demonstrating Data to Knowledge Pipelines
Commits
9360b7dd
Commit
9360b7dd
authored
1 year ago
by
Leon Michel Gorißen
Browse files
Options
Downloads
Patches
Plain Diff
wip
parent
bdf808e1
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
dynamics_learning/dynamics_learning/preprocessing/dataset_analysis.py
+174
-172
174 additions, 172 deletions
...rning/dynamics_learning/preprocessing/dataset_analysis.py
with
174 additions
and
172 deletions
dynamics_learning/dynamics_learning/preprocessing/dataset_analysis.py
+
174
−
172
View file @
9360b7dd
...
@@ -31,21 +31,17 @@ def gauss(x: np.ndarray, *p: float) -> np.ndarray:
...
@@ -31,21 +31,17 @@ def gauss(x: np.ndarray, *p: float) -> np.ndarray:
# Initial guess for Gaussian parameters
# Initial guess for Gaussian parameters
p0
=
[
1
,
0
,
1
]
p0
=
[
1
,
0
,
1
]
def
analyze
()
->
None
:
def
analyze
(
directory
:
str
,
dataset
:
str
)
->
None
:
"""
"""
Analyzes dataset
s
in
specified
director
ies
, generates statistics, and creates plots.
Analyzes
the specified
dataset in
the given
director
y
, generates statistics, and creates plots.
This function processes datasets, performs statistical analysis, and saves the results
Args:
and plots for each dataset.
directory (str): The directory containing the dataset.
dataset (str): The dataset to be analyzed (e.g.,
"
train
"
,
"
test
"
).
Returns:
Returns:
None
None
"""
"""
directories
=
[
"
dataset_v1
"
,
"
dataset_v2
"
,
"
dataset_v3
"
]
datasets
=
[
"
train
"
,
"
test
"
]
for
directory
in
directories
:
for
dataset
in
datasets
:
# Initialize empty arrays for data collection
# Initialize empty arrays for data collection
attained_freqs
=
np
.
empty
([
0
,
1
])
attained_freqs
=
np
.
empty
([
0
,
1
])
duration_meas
=
np
.
empty
(
0
,
np
.
float32
)
duration_meas
=
np
.
empty
(
0
,
np
.
float32
)
...
@@ -211,6 +207,12 @@ def analyze() -> None:
...
@@ -211,6 +207,12 @@ def analyze() -> None:
fig
.
savefig
(
f
"
data/
{
directory
}
/analysis/hist_
{
dataset
}
_
{
names
[
i
]
}
.png
"
)
fig
.
savefig
(
f
"
data/
{
directory
}
/analysis/hist_
{
dataset
}
_
{
names
[
i
]
}
.png
"
)
plt
.
close
(
fig
)
plt
.
close
(
fig
)
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
analize
()
directories
=
[
"
dataset_v1
"
,
"
dataset_v2
"
,
"
dataset_v3
"
]
\ No newline at end of file
datasets
=
[
"
train
"
,
"
test
"
]
#TODO test if this works
for
directory
in
directories
:
for
dataset
in
datasets
:
analyze
(
directory
,
dataset
)
\ 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