Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote sensing regression #282

Merged
merged 2 commits into from
Jun 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions processing/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,16 @@ def is_remote_sensing_pretrained(dataset_doc: dict, problem: dict) -> bool:
classification = (
_problem.TaskKeyword.CLASSIFICATION in problem["problem"]["task_keywords"]
)
regression = _problem.TaskKeyword.REGRESSION in problem["problem"]["task_keywords"]
remote_sensing = (
_problem.TaskKeyword.REMOTE_SENSING in problem["problem"]["task_keywords"]
)
return (
"image" not in get_resource_types(dataset_doc)
and classification
and (classification or regression)
and remote_sensing
and _problem.TaskKeyword.SEMISUPERVISED not in problem["problem"]["task_keywords"]
and _problem.TaskKeyword.SEMISUPERVISED
not in problem["problem"]["task_keywords"]
)


Expand All @@ -161,7 +163,8 @@ def is_remote_sensing(dataset_doc: dict, problem: dict) -> bool:
"image" in get_resource_types(dataset_doc)
and (classification or regression)
and remote_sensing
and _problem.TaskKeyword.SEMISUPERVISED not in problem["problem"]["task_keywords"]
and _problem.TaskKeyword.SEMISUPERVISED
not in problem["problem"]["task_keywords"]
)


Expand Down Expand Up @@ -210,13 +213,23 @@ def is_text(dataset_doc: dict) -> bool:


def is_semisupervised_tabular(problem: dict) -> bool:
remote_sensing = _problem.TaskKeyword.REMOTE_SENSING in problem["problem"]["task_keywords"]
return not remote_sensing and _problem.TaskKeyword.SEMISUPERVISED in problem["problem"]["task_keywords"]
remote_sensing = (
_problem.TaskKeyword.REMOTE_SENSING in problem["problem"]["task_keywords"]
)
return (
not remote_sensing
and _problem.TaskKeyword.SEMISUPERVISED in problem["problem"]["task_keywords"]
)


def is_semisupervised_remote_sensing_pretrained(problem: dict) -> bool:
remote_sensing = _problem.TaskKeyword.REMOTE_SENSING in problem["problem"]["task_keywords"]
return remote_sensing and _problem.TaskKeyword.SEMISUPERVISED in problem["problem"]["task_keywords"]
remote_sensing = (
_problem.TaskKeyword.REMOTE_SENSING in problem["problem"]["task_keywords"]
)
return (
remote_sensing
and _problem.TaskKeyword.SEMISUPERVISED in problem["problem"]["task_keywords"]
)


# --
Expand Down