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

Dev/518/formula #309

Merged
merged 26 commits into from
Dec 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6c10d74
New version of Descriptive Statistics displaying Null counts
jassak Jul 9, 2021
72a24a7
Merge branch 'master' of https://github.com/madgik/exareme into fix/4…
jassak Jul 9, 2021
406f405
Fix module not found error
jassak Jul 12, 2021
20983f3
Fix gitignore
jassak Jul 12, 2021
13c3960
Refactor mipframework/parameters.py and add tests
jassak Sep 22, 2021
3385f63
Add new formula functionality
jassak Sep 30, 2021
8105ba8
Add first tests for logistic regression with formula
jassak Sep 30, 2021
bcf0f66
Formula refactoring and bug fixes
jassak Oct 4, 2021
7ad2017
Move coding processing in parameters.py
jassak Oct 6, 2021
fc2f3f9
Fix tests since moving coding processing to parameter.py
jassak Oct 21, 2021
eca0c54
Merge branch 'fix/438/descr-stats-show-nulls' into dev/518/formula
jassak Oct 21, 2021
880cadd
Add formula field in descriptive stats and fix some tests
jassak Oct 21, 2021
a35c127
Add tests for descriptive stats with formula
jassak Oct 21, 2021
d38e23c
Remove coding field from various places
jassak Oct 25, 2021
93eb960
Remove categorical coding functionality from formula
jassak Oct 25, 2021
ea02bdb
Added a formula_description property in the algorithms' specifications.
ThanKarab Oct 26, 2021
3a9d096
Added descriptive stats working example values.
ThanKarab Oct 26, 2021
5173295
Fix formula tests wrt id function
jassak Nov 1, 2021
30b9007
Descriptive statistics with formula
jassak Nov 2, 2021
e31c4db
Merge branch 'dev/518/formula' of https://github.com/madgik/exareme i…
jassak Nov 2, 2021
009ab08
Fix: formula should be one sided if there are no covariables
jassak Nov 2, 2021
997a9f7
Fix Logistic Regression formula parameter in properties.json
jassak Nov 4, 2021
908930a
Fix for empty formula description parameter.
ThanKarab Nov 25, 2021
878ba62
Remove unnecessary prefixes from var names in Logistic Regression
jassak Nov 25, 2021
d08b6f0
Fix logistic tests with formula (remove prefixes)
jassak Dec 20, 2021
b42b006
Moved mip-algorithms test urls in __init__.
ThanKarab Dec 20, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ private static void validateAlgorithmParameterValueType(
ParameterProperties parameterProperties
) throws AlgorithmException, BadUserInputException {
if (parameterProperties.getValueType().equals(ParameterProperties.ParameterValueType.json)) {
if (value.equals(""))
return;
try {
new JSONObject(value);
} catch (JSONException ex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class ParameterProperties {
public enum ParameterType {
column, // used for selecting specific columns from the database
formula, // used for parsing the input as a formula of R, '+ - * : 0' are allowed.
formula_description, // used for providing a formula description to the algorithm in json format
filter, // used for filtering on the database input
dataset, // used for choosing database input
pathology, // used for specifying what database to use
Expand All @@ -33,7 +34,6 @@ public enum ParameterValueType {
real,
json
}

public ParameterProperties() {
}

Expand All @@ -50,13 +50,15 @@ public void validateParameterPropertiesInitialization(String algorithmName) thro
if (type == null) {
throw new AlgorithmException(algorithmName, "The parameter field 'type' was not initialized in the properties.json file.");
} else if (type.equals(ParameterType.column) || type.equals(ParameterType.formula)) {
if (columnValuesSQLType == null) {
}

if (columnValuesIsCategorical == null) {
throw new AlgorithmException(algorithmName, "The parameter field 'columnValuesIsCategorical' was not initialized in the properties.json file.");
}
} else if (valueType.equals(ParameterValueType.json)){
}else if (type.equals(ParameterType.formula_description)) {
if (!valueType.equals(ParameterValueType.json)) {
throw new AlgorithmException(algorithmName, "The parameter field 'valueType' must be json since the 'type' is formula_description.");
}
}
if (valueType.equals(ParameterValueType.json)){
if(valueMultiple) {
throw new AlgorithmException(algorithmName, "The parameter field 'valueMultiple' cannot be true because the 'valueType' is json.");
}
Expand Down
2 changes: 1 addition & 1 deletion Exareme-Docker/src/mip-algorithms/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# db files
*.db
# !mipframework/runner/dbs/datasets.db
!mipframework/runner/dbs/datasets.db
# !mipframework/runner/dbs/1LocalDBs/local_dataset0.db
# !mipframework/runner/dbs/10LocalDBs/local_dataset0.db
# !mipframework/runner/dbs/10LocalDBs/local_dataset1.db
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from descriptive_stats import DescriptiveStats
from .descriptive_stats import DescriptiveStats

__all__ = ["DescriptiveStats"]
Loading