Skip to content

Commit c593426

Browse files
Merge #406
406: Multiple improvements r=DilumAluthge a=DilumAluthge 1. Remove unnecessary comments. 2. Better approach to generating examples. 3. Store the output of the examples in a subdirectory of the directory containing the generated example files. Co-authored-by: Dilum Aluthge <[email protected]>
2 parents 26d9ae4 + c94984f commit c593426

File tree

166 files changed

+952
-1105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+952
-1105
lines changed

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
##### Beginning of file
2-
31
### Directories to ignore:
42

53
*.ipynb_checkpoints/
@@ -35,4 +33,3 @@ Manifest.toml
3533

3634
scratch.jl
3735

38-
##### End of file

.travis.yml

-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
##### Beginning of file
2-
3-
############################################################################
4-
51
addons:
62
apt:
73
packages:
@@ -336,6 +332,3 @@ jobs:
336332
# install: ./ci/travis/install.sh "travis-7"
337333
# script: ./ci/travis/script.sh "travis-7"
338334

339-
############################################################################
340-
341-
##### End of file

CONTRIBUTING.md

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<!-- Beginning of file -->
2-
31
# Contributing to PredictMD
42

53
This document provides information on contributing to the
@@ -574,4 +572,3 @@ The final step is to go to the Zenodo entry for the newly created release and pu
574572

575573
After you have entered the correct information in all of the above fields, click the white "Save" button, and then click the blue "Publish" button. Congratulations, you are finished!
576574

577-
<!-- End of file -->

Project.toml

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd"
4343
NumericalIntegration = "e7bfaba1-d571-5449-8927-abc22e82249b"
4444
PGFPlotsX = "8314cec4-20b6-5062-9cdb-752b83310925"
4545
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
46+
PredictMDAPI = "df4d2c64-811c-11e9-2782-c5e8d6893c98"
4647
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
4748
Query = "1a8c2f83-1ff3-5112-b086-8aa67b057ba1"
4849
RData = "df47a6cb-8c03-5eed-afd8-b6050d6c41da"

ci/travis/before_install.sh

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/bash
22

3-
##### Beginning of file
4-
53
set -ev
64

75
export COMPILED_MODULES=$COMP_MODS
@@ -71,4 +69,3 @@ else
7169
:
7270
fi
7371

74-
##### End of file

ci/travis/install.sh

-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/bash
22

3-
##### Beginning of file
4-
53
set -ev
64

75
export COMPILED_MODULES=$COMP_MODS
@@ -68,8 +66,6 @@ then
6866
fi
6967
julia $JULIA_FLAGS -e 'import Pkg;Pkg.add("Coverage");'
7068
julia $JULIA_FLAGS -e 'import Pkg;cd(Pkg.dir("PredictMD"));import Coverage;Coverage.Codecov.submit(Coverage.Codecov.process_folder());'
71-
cat Project.toml
72-
cat Manifest.toml
7369
else
7470
:
7571
fi
@@ -85,4 +81,3 @@ fi
8581
mkdir -p $HOME/predictmd_cache_travis
8682
find $HOME/predictmd_cache_travis
8783

88-
##### End of file

ci/travis/script.sh

-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
#!/bin/bash
22

3-
##### Beginning of file
4-
53
set -ev
64

75
true
86

9-
##### End of file

codecov.yml

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
##### Beginning of file
2-
31
codecov:
42
branch: master
53

@@ -25,4 +23,3 @@ ignore:
2523
# ignore src/toplevel/utils/openbrowserwindow.jl
2624
# - "src/toplevel/utils/openbrowserwindow.jl"
2725

28-
##### End of file

docs/make.jl

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
##### Beginning of file
2-
31
import Pkg
42

53
Pkg.add("Documenter")
@@ -92,4 +90,3 @@ end
9290

9391
ENV["PREDICTMD_IS_DEPLOY_DOCS"] = "false"
9492

95-
##### End of file

docs/mkdocs.yml

+15-18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
##### Beginning of file
2-
31
site_name: PredictMD documentation
42
# repo_url: https://github.com/bcbi/PredictMD.jl
53
site_description: PredictMD - uniform interface for machine learning in Julia
@@ -32,46 +30,45 @@ pages:
3230
"generate_examples/generate_examples.md"
3331
- "Boston housing (single label regression)":
3432
- "1. Preprocess data":
35-
"examples/cpu/boston_housing/01_preprocess_data.md"
33+
"examples/cpu_examples/boston_housing/01_preprocess_data.md"
3634
- "2. Linear regression":
37-
"examples/cpu/boston_housing/02_linear_regression.md"
35+
"examples/cpu_examples/boston_housing/02_linear_regression.md"
3836
- "3. Random forest regression":
39-
"examples/cpu/boston_housing/\
37+
"examples/cpu_examples/boston_housing/\
4038
03_random_forest_regression.md"
4139
- "4. Knet neural network regression":
42-
"examples/cpu/boston_housing/04_knet_mlp_regression.md"
40+
"examples/cpu_examples/boston_housing/04_knet_mlp_regression.md"
4341
- "5. Compare models":
44-
"examples/cpu/boston_housing/05_compare_models.md"
42+
"examples/cpu_examples/boston_housing/05_compare_models.md"
4543
- "6. Directly access model output":
46-
"examples/cpu/boston_housing/06_get_model_output.md"
44+
"examples/cpu_examples/boston_housing/06_get_model_output.md"
4745
- "Breast cancer biopsy (single label binary classification)":
4846
- "1. Preprocess data":
49-
"examples/cpu/breast_cancer_biopsy/\
47+
"examples/cpu_examples/breast_cancer_biopsy/\
5048
01_preprocess_data.md"
5149
- "2. Apply SMOTE algorithm":
52-
"examples/cpu/breast_cancer_biopsy/02_smote.md"
50+
"examples/cpu_examples/breast_cancer_biopsy/02_smote.md"
5351
- "3. Logistic classifier":
54-
"examples/cpu/breast_cancer_biopsy/\
52+
"examples/cpu_examples/breast_cancer_biopsy/\
5553
03_logistic_classifier.md"
5654
- "4. Random forest classifier":
57-
"examples/cpu/breast_cancer_biopsy/\
55+
"examples/cpu_examples/breast_cancer_biopsy/\
5856
04_random_forest_classifier.md"
5957
- "5. C-SVC support vector machine classifier":
60-
"examples/cpu/breast_cancer_biopsy/\
58+
"examples/cpu_examples/breast_cancer_biopsy/\
6159
05_c_svc_svm_classifier.md"
6260
- "6. nu-SVC support vector machine classifier":
63-
"examples/cpu/breast_cancer_biopsy/\
61+
"examples/cpu_examples/breast_cancer_biopsy/\
6462
06_nu_svc_svm_classifier.md"
6563
- "7. Knet neural network classifier":
66-
"examples/cpu/breast_cancer_biopsy/\
64+
"examples/cpu_examples/breast_cancer_biopsy/\
6765
07_knet_mlp_classifier.md"
6866
- "8. Compare models":
69-
"examples/cpu/breast_cancer_biopsy/\
67+
"examples/cpu_examples/breast_cancer_biopsy/\
7068
08_compare_models.md"
7169
- "9. Directly access model output":
72-
"examples/cpu/breast_cancer_biopsy/\
70+
"examples/cpu_examples/breast_cancer_biopsy/\
7371
09_get_model_output.md"
7472
- "Library":
7573
- "Internals": "library/internals.md"
7674

77-
##### End of file

docs/src/generate_examples/generate_examples.md

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<!-- Beginning of file -->
2-
31
# Generating example files locally
42

53
You can generate the example files using the `generate_examples`
@@ -31,4 +29,3 @@ running the `generate_examples` function.
3129
PredictMD.generate_examples(output_directory; notebooks = true)
3230
```
3331

34-
<!-- End of file -->

docs/src/index.md

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<!-- Beginning of file -->
2-
31
# PredictMD
42

53
[PredictMD](https://predictmd.net) is a free and open-source Julia package that provides a uniform
@@ -28,4 +26,3 @@ Pkg.test("PredictMDExtra")
2826
Pkg.test("PredictMDFull")
2927
```
3028

31-
<!-- End of file -->

docs/src/library/internals.md

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<!-- Beginning of file -->
2-
31
# Documentation of internals
42

53
```@contents
@@ -76,4 +74,3 @@ Order = [:macro]
7674
```@index
7775
```
7876

79-
<!-- End of file -->

docs/src/requirements_for_plotting.md

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<!-- Beginning of file -->
2-
31
# Requirements for plotting
42

53
There are no requirements in order to run PredictMD--you can train, run,
@@ -67,4 +65,3 @@ pdf2svg from the appropriate link below:
6765
* GNU/Linux: [http://www.cityinthesky.co.uk/opensource/pdf2svg/](
6866
http://www.cityinthesky.co.uk/opensource/pdf2svg/)
6967

70-
<!-- End of file -->

src/PredictMD.jl

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
##### Beginning of file
2-
31
__precompile__(true)
42

53
"""
@@ -450,6 +448,11 @@ include(
450448
"toplevel", "utils", "labelstringintmaps.jl",
451449
)
452450
)
451+
include(
452+
joinpath(
453+
"toplevel", "utils", "linearly_dependent_columns.jl",
454+
)
455+
)
453456
include(
454457
joinpath(
455458
"toplevel", "utils", "make_directory.jl",
@@ -570,4 +573,3 @@ include(
570573

571574
end # end module PredictMD
572575

573-
##### End of file

src/base/abstract-types.jl

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
##### Beginning of file
2-
31
abstract type Fittable end
42

53
"""
@@ -32,4 +30,3 @@ abstract type AbstractTransformer <: Fittable end
3230

3331
abstract type AbstractNonExistentUnderlyingObject end
3432

35-
##### End of file

src/base/backends.jl

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
##### Beginning of file
2-
31
module Backends # begin submodule PredictMD.Backends
42

53
abstract type AbstractBackend end
@@ -33,4 +31,3 @@ end
3331

3432
end # end submodule PredictMD.Backends
3533

36-
##### End of file

src/base/concrete-types.jl

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
##### Beginning of file
2-
31
struct FeatureContrastsNotYetGenerated <: AbstractNonExistentFeatureContrasts
42
end
53

@@ -200,4 +198,3 @@ mutable struct DecisionTreeModel <:
200198
underlyingrandomforest::T7 where T7 <: Any
201199
end
202200

203-
##### End of file

src/base/interface.jl

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
##### Beginning of file
1+
import PredictMDAPI
22

33
"""
44
"""
@@ -9,4 +9,3 @@ function set_max_epochs!(
99
return nothing
1010
end
1111

12-
##### End of file

src/base/next_version_number.jl

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
##### Beginning of file
2-
31
function next_major_version(
42
current_version::VersionNumber;
53
add_trailing_minus::Bool = false,
@@ -66,4 +64,3 @@ function next_patch_version(
6664
return result
6765
end
6866

69-
##### End of file

src/init.jl

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
##### Beginning of file
2-
31
import Requires
42

53
const _predictmd_has_MLJ = Ref(false)
@@ -59,4 +57,3 @@ function __init__()::Nothing
5957
return nothing
6058
end
6159

62-
##### End of file

src/package_directory.jl

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
##### Beginning of file
2-
31
function is_filesystem_root(path::AbstractString)::Bool
42
path::String = abspath(strip(path))
53
if path == dirname(path)
@@ -182,4 +180,3 @@ function package_directory(m::Module, parts...)::String
182180
return result
183181
end
184182

185-
##### End of file

src/predictmd_glue_modules/PredictMD_Glue_MLJ/PredictMD_Glue_MLJ.jl

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
##### Beginning of file
2-
31
__precompile__(true)
42

53
"""
@@ -23,4 +21,3 @@ end
2321

2422
end # end module PredictMD_Glue_MLJ
2523

26-
##### End of file

src/registry_url_list.jl

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
##### Beginning of file
2-
31
# function registry_url_list()::Vector{String}
42
# registry_url_list_raw::Vector{String} = String[
53
# "https://github.com/JuliaRegistries/General",
@@ -9,4 +7,3 @@
97
# return registry_url_list
108
# end
119

12-
##### End of file

src/submodules/Cleaning/Cleaning.jl

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
##### Beginning of file
2-
31
"""
42
"""
53
module Cleaning # begin submodule PredictMD.Cleaning
@@ -13,4 +11,3 @@ include(joinpath("hcup", "hcup.jl",))
1311

1412
end # begin submodule PredictMD.Cleaning
1513

16-
##### End of file

src/submodules/Cleaning/hcup/hcup.jl

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
##### Beginning of file
2-
31
import CSV
42
import CSVFiles
53
import DataFrames
@@ -518,4 +516,3 @@ function clean_hcup_nis_csv_icd9(
518516
return output_file_name
519517
end
520518

521-
##### End of file

src/submodules/Compilation/Compilation.jl

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
##### Beginning of file
2-
31
"""
42
"""
53
module Compilation # begin submodule PredictMD.Compilation
@@ -16,4 +14,3 @@ include(joinpath("packagecompiler", "packagecompiler.jl",))
1614

1715
end # end submodule PredictMD.Compilation
1816

19-
##### End of file
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
##### Beginning of file
2-
31
# import BuildExecutable
42

5-
##### End of file
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
##### Beginning of file
2-
31
# import PackageCompiler
42
# import SnoopCompile
53

6-
##### End of file

0 commit comments

Comments
 (0)