Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
Leipzig Machine Learning Group
conML
python
Commits
6398c09f
Commit
6398c09f
authored
5 years ago
by
dmt
Browse files
Options
Downloads
Patches
Plain Diff
Provide capability to find overlapping rows and fuse learnblocks.
parent
a8a8f3fe
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cml/ports/source_adapters.py
+12
-0
12 additions, 0 deletions
cml/ports/source_adapters.py
with
12 additions
and
0 deletions
cml/ports/source_adapters.py
+
12
−
0
View file @
6398c09f
...
@@ -45,6 +45,7 @@ class PandasBlock:
...
@@ -45,6 +45,7 @@ class PandasBlock:
self
.
__data_block
=
data_block
self
.
__data_block
=
data_block
self
.
relatives
=
relatives
self
.
relatives
=
relatives
self
.
n_cluster
=
None
self
.
n_cluster
=
None
self
.
purpose
=
None
def
__str__
(
self
):
def
__str__
(
self
):
return
str
(
self
.
__data_block
)
return
str
(
self
.
__data_block
)
...
@@ -82,6 +83,17 @@ class PandasBlock:
...
@@ -82,6 +83,17 @@ class PandasBlock:
data_frame
[
"
Z
"
]
=
labels
data_frame
[
"
Z
"
]
=
labels
return
PandasBlock
(
data_frame
,
self
.
relatives
)
return
PandasBlock
(
data_frame
,
self
.
relatives
)
def
overlapping_rows
(
self
,
block
):
overlapping
=
self
.
__data_block
[
self
.
__data_block
.
isin
(
block
)].
dropna
(
axis
=
0
,
how
=
"
all
"
)
return
self
.
new_block_from_rows_index
(
overlapping
.
indexes
)
def
fusion
(
self
,
block
):
return
self
.
new_block_from_rows_index
(
self
.
indexes
+
block
.
indexes
)
@property
@property
def
min_timestamp
(
self
):
def
min_timestamp
(
self
):
return
min
(
self
.
__data_block
[
"
T
"
])
return
min
(
self
.
__data_block
[
"
T
"
])
...
...
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