Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Stanislav Yuliyanov
oc-dfg-clustering
Commits
77f67528
Commit
77f67528
authored
May 25, 2022
by
SimonGlomb
Browse files
basic structure for all arguments
parent
936c466d
Changes
1
Hide whitespace changes
Inline
Side-by-side
code/main.py
View file @
77f67528
...
...
@@ -13,49 +13,52 @@ from sklearn import cluster as skcluster
import
argparse
CLI
=
argparse
.
ArgumentParser
()
CLI
.
add_argument
(
"p_ocel_file"
,
# name on the CLI - drop the `--` for positional/required parameters
"p_ocel_file"
,
type
=
str
,
default
=
[],
# default if nothing is provided # TODO
default
=
[
"./data/ocel.jsonocel"
],
)
CLI
.
add_argument
(
"p_mode"
,
type
=
str
,
default
=
[],
# default if nothing is provided
)
CLI
.
add_argument
(
"p_object_type"
,
type
=
str
,
default
=
[],
# default if nothing is provided
)
CLI
.
add_argument
(
"p_attr_weights"
,
type
=
str
,
default
=
[],
# default if nothing is provided
)
CLI
.
add_argument
(
"p_clustering_mode"
,
type
=
str
,
default
=
[],
# default if nothing is provided
)
CLI
.
add_argument
(
"p_ocel_file_type"
,
type
=
str
,
default
=
[],
# default if nothing is provided
)
CLI
.
add_argument
(
"p_graph_file_type"
,
type
=
str
,
default
=
[],
# default if nothing is provided
)
# CLI.add_argument(
# "p_ocel_file", # name on the CLI - drop the `--` for positional/required parameters
# type=str,
# default=['./data/ocel.jsonocel'], # default if nothing is provided # TODO
# )
# CLI.add_argument(
# "p_ocel_file", # name on the CLI - drop the `--` for positional/required parameters
# type=str,
# default=['./data/ocel.jsonocel'], # default if nothing is provided # TODO
# )
# CLI.add_argument(
# "p_ocel_file", # name on the CLI - drop the `--` for positional/required parameters
# type=str,
# default=['./data/ocel.jsonocel'], # default if nothing is provided # TODO
# )
# CLI.add_argument(
# "p_ocel_file", # name on the CLI - drop the `--` for positional/required parameters
# type=str,
# default=['./data/ocel.jsonocel'], # default if nothing is provided # TODO
# )
# CLI.add_argument(
# "p_ocel_file", # name on the CLI - drop the `--` for positional/required parameters
# type=str,
# default=['./data/ocel.jsonocel'], # default if nothing is provided # TODO
# )
args
=
CLI
.
parse_args
()
#
# PARAMETERS
p_ocel_file
=
args
.
p_ocel_file
p_mode
=
'existence'
# all | existence
p_object_type
=
'products'
# object-type-name, options depend on the data
p_attr_weights
=
{
'producer'
:
2
}
# attributes that are not given in the data are not used
p_clustering_mode
=
'kmeans'
# optional, default: kmeans
p_cluster_count
=
3
# np.NaN # cluster-count (optional, default: np.NaN which leads to automatic k determination)
p_ocel_file_type
=
'json'
# json|xml
p_graph_file_type
=
'svg'
# svg|png
p_ocel_file
=
args
.
p_ocel_file
# "./data/ocel.jsonocel"
p_mode
=
args
.
p_mode
# 'existence' # all | existence
p_object_type
=
args
.
p_object_type
# 'products' # object-type-name, options depend on the data
p_attr_weights
=
args
.
p_attr_weights
# {'producer': 2} # attributes that are not given in the data are not used
p_clustering_mode
=
args
.
p_clustering_mode
# 'kmeans' # optional, default: kmeans
p_cluster_count
=
args
.
p_cluster_count
# 3 # np.NaN # cluster-count (optional, default: np.NaN which leads to automatic k determination)
p_ocel_file_type
=
args
.
p_ocel_file_type
# 'json' # json|xml
p_graph_file_type
=
args
.
p_graph_file_type
# 'svg' # svg|png
# END PARAMETERS
#
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment