├── .travis.yml ├── LICENSE ├── README.md ├── docs ├── .nojekyll ├── Makefile └── source │ ├── _static │ └── journal_style.css │ ├── _templates │ ├── layout.html │ └── layout.html.original │ ├── conf.py │ ├── contribution.rst │ ├── documentation.rst │ ├── index.rst │ ├── infrastructure.rst │ ├── installation.rst │ ├── introduction.rst │ ├── logo │ ├── swung.png │ └── swung_bw.png │ ├── reviewing.rst │ └── scope.rst ├── dont_travis.yml ├── environment.yml ├── resources.md └── submissions ├── armitage-05-2019 ├── armitage-submission-05-2019.ipynb └── requirements.txt └── armitage2-05-2019 ├── armitage-submission2-05-2019.ipynb ├── requirements.txt └── train.csv /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | 3 | python: 4 | - 3.6 5 | 6 | install: 7 | - pip install sphinx 8 | - pip install sphinx_rtd_theme 9 | - pip install numpydoc 10 | 11 | script: 12 | # Use Sphinx to make the html docs 13 | - cd docs 14 | - make html 15 | - touch _build/html/.nojekyll 16 | 17 | # Tell Travis CI to copy the documentation to the gh-pages branch of 18 | # your GitHub repository. 19 | deploy: 20 | provider: pages 21 | skip_cleanup: true 22 | github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard, marked secure 23 | keep-history: true 24 | local-dir: docs/_build/html/ 25 | target-branch: gh-pages # This is the default branch but I add it here anyway 26 | on: 27 | branch: master 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # The Subsurface - An Executable Journal 2 | 3 | > This is the place where research scientists, researchers in industry, software 4 | developers, and data scientists can communicate there novel solutions for problems in 5 | the subsurface. This reproducible journal is code agnostic. It is a place for people to 6 | communicate their analysis, tools, and solutions. 7 | 8 | ## Scope 9 | 10 | We accept submissions that address challenges within subsurface science. This includes 11 | all aspects of research from fundamental science to tools to solve exploration problems. 12 | The key is that the solutions presented are open and reproducible. To that end 13 | submissions are in the form of a Jupyter Notebook. 14 | 15 | ## Guidelines 16 | 17 | Submission is through this github repository. We require at a minimum two files, the 18 | notebook, and a file that lists the dependencies. 19 | 20 | ### The Notebook 21 | 22 | We accept [Jupyter Notebooks](https://jupyter.org/) only, as these are open source and 23 | code agnostic. We accept notebooks in any language supported within Jupyter. For 24 | example this could be Python, Julia, R, C++, Fortran, Octave, etc. 25 | 26 | The notebook serves as the manuscript including figures and tables. Please structure the 27 | notebook as follows (we provide templates [here](#)): 28 | * Title and list of authors, including affiliations and contact details. 29 | * Abstract, providing a brief summary of the notebook. 30 | * Introduction, where the content of the notebook is put in the context of current and 31 | past work within the community. 32 | * Methods and Results, which will naturally flow together within the notebook format. 33 | * Discussion and Conclusions. 34 | * References (we need to work out how to interact with Crossref..) 35 | 36 | ### Dependencies 37 | 38 | The second file is a list of dependencies. 39 | * ```conda``` please provide an ```environment.yml``` file with the 40 | dependencies 41 | * Otherwise please provide a ````requirements.txt```` file. 42 | * If the notebook is analysing results of a large numerical calculation we require 43 | that the code is open source and hosted on a repository. 44 | * (Need to research this a bit still) 45 | 46 | **You do not need prior experience in running a notebook or coding. We will figure it 47 | out together.** 48 | 49 | ### Submission 50 | 51 | 1. Create a [github]((https://github.com) account. 52 | 2. [Fork](https://help.github.com/articles/fork-a-repo/) the 53 | [Subsurface](https://github.com/softwareunderground/subsurface-journal) repository. 54 | 4. Create a branch (the branch name should be author names separated with dashes) 55 | ``` 56 | $ git checkout -b AUTHOR1-AUTHOR2-YEAR 57 | ``` 58 | 5. Add your notebook, requirements, and any data required for reproducibility: 59 | ``` 60 | $ git commit -a -m "Some comment" 61 | ``` 62 | 6. [Push](https://help.github.com/articles/pushing-to-a-remote/) to github 63 | ``` 64 | $ git push origin AUTHOR1-AUTHOR2-YEAR 65 | ``` 66 | 67 | 7. Issue a [pull request](https://help.github.com/articles/using-pull-requests/) (PR) 68 | to Subsurface with title containing author(s) name and follow the template that will 69 | appear once you opened the pull request: 70 | 71 | ``` 72 | **AUTHOR** 73 | 74 | Dear @Subsurface/editors, 75 | 76 | I request a review for the following notebook: 77 | 78 | ### Original article 79 | 80 | **Title:** 81 | **Author(s):** 82 | **Year:** 83 | 84 | ### Potential reviewers 85 | 86 | ``` 87 | 8. You can suggest reviewers from [editorial board](#). 88 | 9. Answer questions and requests made in the PR conversation page. 89 | 90 | ### Post submission 91 | 92 | Once the pull request has been made the notebook will be executed and using ```nbval``` 93 | it will automatically tested for reproducibility. If this check fails don't sweat, it 94 | is probably due to the dependencies. We can help work it out. Subsequently the gang of 95 | four will look at the notebook and solicit a minimum of two reviews and we will 96 | itterate towards a reproducible article. Once passing review the notebook will be given 97 | a unique DOI (via [zenodo](https://zenodo.org/) perhaps) and a 98 | [binder](https://ovh.mybinder.org/) image will be generated. This will result in a 99 | eternally reproducible article. 100 | 101 | ### Questions 102 | 103 | Jump right into the [issues](https://github.com/softwareunderground/subsurface-journal/issues) to add your ideas about how a journal should look like. We would like to hear about scope, feature, accessibility, peer review process, technology, licensing, possible journals in kind, sources of funding, and anything our ideas do not cover yet. You can open new issues and add to existing ones. 104 | 105 | Please also check out the #journal channel on the 106 | [Software Underground Slack](http://softwareunderground.org/slack). 107 | As per usual discussion here and in the community falls under our 108 | [Code of Conduct](https://github.com/softwareunderground/code-of-conduct). 109 | 110 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # You can set these variables from the command line. 2 | SPHINXOPTS = 3 | SPHINXBUILD = sphinx-build 4 | #SPHINXBUILD = python3 -m sphinx 5 | SPHINXPROJ = journal 6 | SOURCEDIR = source 7 | PAPER = a4 8 | BUILDDIR = _build 9 | 10 | # Internal variables. 11 | PAPEROPT_a4 = -D latex_paper_size=a4 12 | PAPEROPT_letter = -D latex_paper_size=letter 13 | #ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 14 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCEDIR) 15 | # the i18n builder cannot share the environment and doctrees with the others 16 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 17 | 18 | .PHONY: help 19 | help: 20 | @echo "Please use \`make ' where is one of" 21 | @echo " html to make standalone HTML files" 22 | @echo " dirhtml to make HTML files named index.html in directories" 23 | @echo " singlehtml to make a single large HTML file" 24 | @echo " pickle to make pickle files" 25 | @echo " json to make JSON files" 26 | @echo " htmlhelp to make HTML files and a HTML help project" 27 | @echo " qthelp to make HTML files and a qthelp project" 28 | @echo " applehelp to make an Apple Help Book" 29 | @echo " devhelp to make HTML files and a Devhelp project" 30 | @echo " epub to make an epub" 31 | @echo " epub3 to make an epub3" 32 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 33 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 34 | @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" 35 | @echo " text to make text files" 36 | @echo " man to make manual pages" 37 | @echo " texinfo to make Texinfo files" 38 | @echo " info to make Texinfo files and run them through makeinfo" 39 | @echo " gettext to make PO message catalogs" 40 | @echo " changes to make an overview of all changed/added/deprecated items" 41 | @echo " xml to make Docutils-native XML files" 42 | @echo " pseudoxml to make pseudoxml-XML files for display purposes" 43 | @echo " linkcheck to check all external links for integrity" 44 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 45 | @echo " coverage to run coverage check of the documentation (if enabled)" 46 | @echo " dummy to check syntax errors of document sources" 47 | 48 | .PHONY: clean 49 | clean: 50 | rm -rf $(BUILDDIR)/* 51 | 52 | .PHONY: html 53 | html: 54 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 55 | @echo 56 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 57 | 58 | .PHONY: dirhtml 59 | dirhtml: 60 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 61 | @echo 62 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 63 | 64 | .PHONY: singlehtml 65 | singlehtml: 66 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 67 | @echo 68 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 69 | 70 | .PHONY: pickle 71 | pickle: 72 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 73 | @echo 74 | @echo "Build finished; now you can process the pickle files." 75 | 76 | .PHONY: json 77 | json: 78 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 79 | @echo 80 | @echo "Build finished; now you can process the JSON files." 81 | 82 | .PHONY: htmlhelp 83 | htmlhelp: 84 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 85 | @echo 86 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 87 | ".hhp project file in $(BUILDDIR)/htmlhelp." 88 | 89 | .PHONY: qthelp 90 | qthelp: 91 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 92 | @echo 93 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 94 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 95 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/SphinxExampleProject.qhcp" 96 | @echo "To view the help file:" 97 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/SphinxExampleProject.qhc" 98 | 99 | .PHONY: applehelp 100 | applehelp: 101 | $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp 102 | @echo 103 | @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." 104 | @echo "N.B. You won't be able to view it unless you put it in" \ 105 | "~/Library/Documentation/Help or install it in your application" \ 106 | "bundle." 107 | 108 | .PHONY: devhelp 109 | devhelp: 110 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 111 | @echo 112 | @echo "Build finished." 113 | @echo "To view the help file:" 114 | @echo "# mkdir -p $$HOME/.local/share/devhelp/SphinxExampleProject" 115 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/SphinxExampleProject" 116 | @echo "# devhelp" 117 | 118 | .PHONY: epub 119 | epub: 120 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 121 | @echo 122 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 123 | 124 | .PHONY: epub3 125 | epub3: 126 | $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3 127 | @echo 128 | @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3." 129 | 130 | .PHONY: latex 131 | latex: 132 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 133 | @echo 134 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 135 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 136 | "(use \`make latexpdf' here to do that automatically)." 137 | 138 | .PHONY: latexpdf 139 | latexpdf: 140 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 141 | @echo "Running LaTeX files through pdflatex..." 142 | $(MAKE) -C $(BUILDDIR)/latex all-pdf 143 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 144 | 145 | .PHONY: latexpdfja 146 | latexpdfja: 147 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 148 | @echo "Running LaTeX files through platex and dvipdfmx..." 149 | $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja 150 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 151 | 152 | .PHONY: text 153 | text: 154 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 155 | @echo 156 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 157 | 158 | .PHONY: man 159 | man: 160 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 161 | @echo 162 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 163 | 164 | .PHONY: texinfo 165 | texinfo: 166 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 167 | @echo 168 | @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." 169 | @echo "Run \`make' in that directory to run these through makeinfo" \ 170 | "(use \`make info' here to do that automatically)." 171 | 172 | .PHONY: info 173 | info: 174 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 175 | @echo "Running Texinfo files through makeinfo..." 176 | make -C $(BUILDDIR)/texinfo info 177 | @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." 178 | 179 | .PHONY: gettext 180 | gettext: 181 | $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale 182 | @echo 183 | @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." 184 | 185 | .PHONY: changes 186 | changes: 187 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 188 | @echo 189 | @echo "The overview file is in $(BUILDDIR)/changes." 190 | 191 | .PHONY: linkcheck 192 | linkcheck: 193 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 194 | @echo 195 | @echo "Link check complete; look for any errors in the above output " \ 196 | "or in $(BUILDDIR)/linkcheck/output.txt." 197 | 198 | .PHONY: doctest 199 | doctest: 200 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 201 | @echo "Testing of doctests in the sources finished, look at the " \ 202 | "results in $(BUILDDIR)/doctest/output.txt." 203 | 204 | .PHONY: coverage 205 | coverage: 206 | $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage 207 | @echo "Testing of coverage in the sources finished, look at the " \ 208 | "results in $(BUILDDIR)/coverage/python.txt." 209 | 210 | .PHONY: xml 211 | xml: 212 | $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml 213 | @echo 214 | @echo "Build finished. The XML files are in $(BUILDDIR)/xml." 215 | 216 | .PHONY: pseudoxml 217 | pseudoxml: 218 | $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml 219 | @echo 220 | @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." 221 | 222 | .PHONY: dummy 223 | dummy: 224 | $(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy 225 | @echo 226 | @echo "Build finished. Dummy builder generates no files." 227 | 228 | -------------------------------------------------------------------------------- /docs/source/_static/journal_style.css: -------------------------------------------------------------------------------- 1 | 2 | /* Change the color scheme */ 3 | /*.wy-side-nav-search, .wy-nav-top, .wy-menu-vertical a:active { 4 | background-color: #af28a2 5 | }*/ 6 | -------------------------------------------------------------------------------- /docs/source/_templates/layout.html: -------------------------------------------------------------------------------- 1 | {% extends "!layout.html" %} 2 | 3 | {# Additional CSS file for the documentation#} 4 | {% set extra_css_files = ['_static/journal_style.css',] %} 5 | -------------------------------------------------------------------------------- /docs/source/_templates/layout.html.original: -------------------------------------------------------------------------------- 1 | {% extends "!layout.html" %} 2 | {% block footer %} {{ super() }} 3 | 4 | 10 | {% endblock %} 11 | -------------------------------------------------------------------------------- /docs/source/conf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | # 4 | # This file is execfile()d with the current directory set to its 5 | # containing dir. 6 | # 7 | # Note that not all possible configuration values are present in this 8 | # autogenerated file. 9 | # 10 | # All configuration values have a default; values that are commented out 11 | # serve to show the default. 12 | 13 | # If extensions (or modules to document with autodoc) are in another directory, 14 | # add these directories to sys.path here. If the directory is relative to the 15 | # documentation root, use os.path.abspath to make it absolute, like shown here. 16 | # 17 | import os 18 | import sys 19 | 20 | import datetime 21 | import sphinx_rtd_theme 22 | 23 | sys.path.insert(0, os.path.abspath('../..')) 24 | 25 | 26 | # -- General configuration ------------------------------------------------ 27 | 28 | # If your documentation needs a minimal Sphinx version, state it here. 29 | # 30 | # needs_sphinx = '1.0' 31 | 32 | # Add any Sphinx extension module names here, as strings. They can be 33 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 34 | # ones. 35 | extensions = ['sphinx.ext.autodoc', 36 | 'sphinx.ext.viewcode', 37 | 'sphinx.ext.intersphinx', 38 | 'sphinx.ext.mathjax', 39 | 'sphinx.ext.ifconfig', 40 | 'sphinx.ext.autosummary', 41 | 'sphinx.ext.doctest', 42 | 'numpydoc'] 43 | 44 | ## Include Python objects as they appear in source files 45 | ## Default: alphabetically ('alphabetical') 46 | autodoc_member_order = 'bysource' 47 | ## Default flags used by autodoc directives 48 | autodoc_default_flags = ['members', 'special-members', 'show-inheritance'] 49 | ## Generate autodoc stubs with summaries from code 50 | autosummary_generate = True 51 | 52 | # Add any paths that contain templates here, relative to this directory. 53 | templates_path = ['_templates'] 54 | 55 | # The suffix(es) of source filenames. 56 | # You can specify multiple suffix as a list of string: 57 | # 58 | # source_suffix = ['.rst', '.md'] 59 | source_suffix = '.rst' 60 | 61 | # The master toctree document. 62 | master_doc = 'index' 63 | 64 | # General information about the project. 65 | year = datetime.date.today().year 66 | project = u'journal' 67 | copyright = u'2018-{:d}, SWUNG'.format(year) 68 | author = 'SWUNG team' 69 | 70 | # The version info for the project you're documenting, acts as replacement for 71 | # |version| and |release|, also used in various other places throughout the 72 | # built documents. 73 | # 74 | # The short X.Y version. 75 | version = '0.0.1' 76 | # The full version, including alpha/beta/rc tags. 77 | release = '0.0.1' 78 | 79 | # The language for content autogenerated by Sphinx. Refer to documentation 80 | # for a list of supported languages. 81 | # 82 | # This is also used if you do content translation via gettext catalogs. 83 | # Usually you set "language" from the command line for these cases. 84 | language = None 85 | 86 | # List of patterns, relative to source directory, that match files and 87 | # directories to ignore when looking for source files. 88 | # This patterns also effect to html_static_path and html_extra_path 89 | exclude_patterns = ['_build'] 90 | 91 | # The name of the Pygments (syntax highlighting) style to use. 92 | pygments_style = 'sphinx' 93 | 94 | # If true, `todo` and `todoList` produce output, else they produce nothing. 95 | todo_include_todos = False 96 | 97 | 98 | # -- Options for HTML output ---------------------------------------------- 99 | 100 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 101 | html_show_sphinx = True 102 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 103 | html_show_copyright = True 104 | 105 | # The theme to use for HTML and HTML Help pages. See the documentation for 106 | # a list of builtin themes. 107 | # 108 | #html_theme = 'alabaster' 109 | html_theme = 'sphinx_rtd_theme' 110 | html_theme_path = sphinx_rtd_theme.get_html_theme_path() 111 | 112 | # Theme options are theme-specific and customize the look and feel of a theme 113 | # further. For a list of options available for each theme, see the 114 | # documentation. 115 | # 116 | html_theme_options = { 117 | } 118 | 119 | # The name of an image file (relative to this directory) to place at the top 120 | # of the sidebar. 121 | html_logo = "./logo/swung_bw.png" 122 | 123 | # Add any paths that contain custom static files (such as style sheets) here, 124 | # relative to this directory. They are copied after the builtin static files, 125 | # so a file named "default.css" will overwrite the builtin "default.css". 126 | html_static_path = ['_static'] 127 | 128 | 129 | # -- Options for HTMLHelp output ------------------------------------------ 130 | 131 | # Output file base name for HTML help builder. 132 | htmlhelp_basename = 'journal_doc' 133 | 134 | 135 | # -- Options for LaTeX output --------------------------------------------- 136 | 137 | latex_elements = { 138 | # The paper size ('letterpaper' or 'a4paper'). 139 | # 140 | # 'papersize': 'letterpaper', 141 | 142 | # The font size ('10pt', '11pt' or '12pt'). 143 | # 144 | # 'pointsize': '10pt', 145 | 146 | # Additional stuff for the LaTeX preamble. 147 | # 148 | # 'preamble': '', 149 | 150 | # Latex figure (float) alignment 151 | # 152 | # 'figure_align': 'htbp', 153 | } 154 | 155 | # Grouping the document tree into LaTeX files. List of tuples 156 | # (source start file, target name, title, 157 | # author, documentclass [howto, manual, or own class]). 158 | latex_documents = [ 159 | ] 160 | 161 | 162 | # -- Options for manual page output --------------------------------------- 163 | 164 | # One entry per manual page. List of tuples 165 | # (source start file, name, description, authors, manual section). 166 | man_pages = [ 167 | ] 168 | 169 | 170 | # -- Options for Texinfo output ------------------------------------------- 171 | 172 | # Grouping the document tree into Texinfo files. List of tuples 173 | # (source start file, target name, title, author, 174 | # dir menu entry, description, category) 175 | texinfo_documents = [ 176 | ] 177 | 178 | 179 | 180 | 181 | # Example configuration for intersphinx: refer to the Python standard library. 182 | intersphinx_mapping = { 183 | 'python': ('https://docs.python.org/', None) 184 | } 185 | 186 | -------------------------------------------------------------------------------- /docs/source/contribution.rst: -------------------------------------------------------------------------------- 1 | ######################### 2 | Contribute to the Journal 3 | ######################### 4 | 5 | Quickstart 6 | ========== 7 | 8 | 1. Create a pull request with your notebook and requirements for any libraries it depends on 9 | * Create a fork of the journal repository in your own github namespace 10 | * Create a branch ( `git checkout -b my_submission_name`), add your notebook and dependencies, commit and push the results and follow the link to create a PR for the journal ) 11 | 2. This should include any data and supporting libraries needed to run the notebook 12 | 3. Your submission will be automatically checked for executability 13 | 4. Style guidelines? (Document layout, code style, writing style?) 14 | 5. Tags or categories? (Are they assigned up-front, how are PRs annotated) 15 | 16 | 17 | What happens next? 18 | ================== 19 | 20 | Your submission will be assigned to two or more reviewers from the `Software Underground` community. Requests for changes and comments will be offered as comments on your pull request. 21 | 22 | If your notebook is accepted by the Journal as an executable publication it will get issued a DOI. 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/source/documentation.rst: -------------------------------------------------------------------------------- 1 | ################################# 2 | How to properly document the code 3 | ################################# 4 | 5 | 6 | We will use `Sphinx `_ 7 | which is a tool that makes it easy to create intelligent and beautiful documentation. 8 | 9 | The documentation will be automatically generated whenever a modification 10 | is committed to the repository. The documentation is hosted on 11 | `GitLab Pages `_ and 12 | it is beautifully formatted using the ReadTheDocs theme. 13 | This `blog post `_ 14 | also gives a nice overview of Sphinx and ReadTheDocs. 15 | 16 | We use the `ReStructuredText `_ 17 | format to write our documentation. 18 | This `blog post `_ 19 | explains why ReStructuredText is better than Markdown for writing documentation. 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/source/index.rst: -------------------------------------------------------------------------------- 1 | Journal 2 | ======= 3 | 4 | 5 | .. image:: logo/swung_bw.png 6 | :width: 40% 7 | :align: center 8 | 9 | 10 | Initial guidelines, ideas, suggestions, and more for a new open-access journal 11 | for peer-reviewed research pertaining to subsurface-related disciplines 12 | For further information and contact information please 13 | see these two web sites: 14 | 15 | * Github repository: https://github.com/softwareunderground/subsurface-journal 16 | * Software Underground website: https://softwareunderground.org/ 17 | 18 | .. note:: 19 | 20 | This project is in its early development. 21 | 22 | .. toctree:: 23 | :hidden: 24 | :maxdepth: 3 25 | :glob: 26 | 27 | introduction 28 | scope 29 | contribution 30 | reviewing 31 | infrastructure 32 | installation 33 | 34 | -------------------------------------------------------------------------------- /docs/source/infrastructure.rst: -------------------------------------------------------------------------------- 1 | ############## 2 | Infrastructure 3 | ############## 4 | 5 | The infrastructure behind the Journal is ... 6 | -------------------------------------------------------------------------------- /docs/source/installation.rst: -------------------------------------------------------------------------------- 1 | ############ 2 | Installation 3 | ############ 4 | 5 | `Download `_ 6 | and install the Python Anaconda Distribution. 7 | 8 | .. code-block:: shell 9 | 10 | conda env create -n environment.yml 11 | source activate journal 12 | 13 | python -m ipykernel install --user --name journal --display-name "Python (journal)" 14 | 15 | -------------------------------------------------------------------------------- /docs/source/introduction.rst: -------------------------------------------------------------------------------- 1 | ############ 2 | Introduction 3 | ############ 4 | 5 | Subsurface Letters is to act as an outlet for subsurface science and engineering. The aim is to provide a platform for the dissemination of executable and reproducible ideas. This can take the form of a new use case for existing open source software, the development of new algorithms that might one day become part of a software package, or the exploration of scientific ideas. At the core, we seek submissions that give worked examples, contain reusable code and ideas, and while all models are wrong, they will be useful. 6 | 7 | Letters are to be short and concise. They can contain code and/ or figures, and are to be submitted in the form of a notebook (currently we have focused on notebooks and python code, but this should not become a python journal, so this should be changed.) The software used within the letter must be in an open repository and include an OSI approved open source license. Letters must include a title, a list of author names and affiliations, an abstract, an introduction, and key references. Submission is via github as outlined in the Contributions stub. 8 | 9 | The mission of Subsurface Letters is to promote reusable and reproducable research within the community and to allow us to build upon the knowledge of the community. 10 | -------------------------------------------------------------------------------- /docs/source/logo/swung.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softwareunderground/subsurface-journal/9cfb76b5936d617721d5bc1f503de33401a26c93/docs/source/logo/swung.png -------------------------------------------------------------------------------- /docs/source/logo/swung_bw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/softwareunderground/subsurface-journal/9cfb76b5936d617721d5bc1f503de33401a26c93/docs/source/logo/swung_bw.png -------------------------------------------------------------------------------- /docs/source/reviewing.rst: -------------------------------------------------------------------------------- 1 | ################### 2 | Peer-review process 3 | ################### 4 | 5 | The peer-review process will be ... 6 | -------------------------------------------------------------------------------- /docs/source/scope.rst: -------------------------------------------------------------------------------- 1 | #################### 2 | Scope of the Journal 3 | #################### 4 | 5 | The scope of the Journal is ... 6 | -------------------------------------------------------------------------------- /dont_travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | 3 | python: 4 | - 3.6 5 | 6 | install: 7 | - pip install sphinx 8 | - pip install sphinx_rtd_theme 9 | - pip install numpydoc 10 | 11 | script: 12 | # Use Sphinx to make the html docs 13 | - cd docs 14 | - make html 15 | - cp -r _build/html/* ./ 16 | 17 | # Tell Travis CI to copy the documentation to the gh-pages branch of 18 | # your GitHub repository. 19 | deploy: 20 | provider: pages 21 | skip_cleanup: true 22 | github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard, marked secure 23 | keep-history: true 24 | target-branch: master 25 | on: 26 | branch: master 27 | -------------------------------------------------------------------------------- /environment.yml: -------------------------------------------------------------------------------- 1 | name: journal 2 | dependencies: 3 | - python=3.7 4 | - sphinx_rtd_theme 5 | - numpydoc 6 | -------------------------------------------------------------------------------- /resources.md: -------------------------------------------------------------------------------- 1 | # Resources 2 | 3 | ## Journals 4 | 5 | * [Journal of Machine Learning Research](https://www.jmlr.org/author-info.html) 6 | * [Volcanica](http://www.jvolcanica.org/ojs/index.php/volcanica/about/submissions) 7 | * [ReScience](https://github.com/ReScience/submissions) 8 | 9 | ## Articles 10 | 11 | * [Praxis of Reproducible Computational Science](https://www.authorea.com/users/34995/articles/329429-praxis-of-reproducible-computational-science) 12 | * [A proposal for the future of scientific publishing in the life sciences](https://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.3000116) 13 | 14 | ## GitHub & Co. 15 | * [Should scientific publishing move to Github and friends?](https://grasshoppermouse.github.io/2019/07/12/should-scientific-publishing-move-to-github-and-friends/) 16 | * [Ten Simple Rules for Taking Advantage of Git and GitHub](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4945047/) 17 | -------------------------------------------------------------------------------- /submissions/armitage-05-2019/requirements.txt: -------------------------------------------------------------------------------- 1 | fenics 2 | numpy 3 | matplotlib 4 | -------------------------------------------------------------------------------- /submissions/armitage2-05-2019/armitage-submission2-05-2019.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "_cell_guid": "00b63778-674d-0a2d-e5b0-8956c5ce1770", 7 | "_uuid": "f83b2c315a72c906e7524c317245175106fd9b4e" 8 | }, 9 | "source": [ 10 | "## A CNN test on the classic digit recogniser problem\n", 11 | "\n", 12 | "The beginning of a simple classification problem using scikit-learn" 13 | ] 14 | }, 15 | { 16 | "cell_type": "code", 17 | "execution_count": 1, 18 | "metadata": { 19 | "_cell_guid": "d0abbfc5-e04e-98d3-8c5c-37d114daa804", 20 | "_uuid": "e6c689b5845633e860af4e0139ebc99b971e1762" 21 | }, 22 | "outputs": [], 23 | "source": [ 24 | "%matplotlib inline\n", 25 | "\n", 26 | "import pandas as pd\n", 27 | "import numpy as np\n", 28 | "import matplotlib.pyplot as plt, matplotlib.image as mpimg\n", 29 | "\n", 30 | "from sklearn.model_selection import train_test_split\n", 31 | "from sklearn.neural_network import MLPClassifier" 32 | ] 33 | }, 34 | { 35 | "cell_type": "markdown", 36 | "metadata": {}, 37 | "source": [ 38 | "Lets load the data, but only part of it to save my wee old laptop from burning out." 39 | ] 40 | }, 41 | { 42 | "cell_type": "code", 43 | "execution_count": 2, 44 | "metadata": { 45 | "_cell_guid": "e8c0e206-f504-253f-8ac6-2c50eff06b58", 46 | "_uuid": "072961c1b2a1ef34b534a13bccf030a36250a6fa" 47 | }, 48 | "outputs": [], 49 | "source": [ 50 | "labeled_images = pd.read_csv('train.csv')\n", 51 | "images = labeled_images.iloc[1:100,1:]\n", 52 | "labels = labeled_images.iloc[1:100,:1]\n", 53 | "train_images, test_images,train_labels, test_labels = train_test_split(images, labels, train_size=0.8, test_size=0.2, random_state=0)" 54 | ] 55 | }, 56 | { 57 | "cell_type": "markdown", 58 | "metadata": { 59 | "_cell_guid": "caa9e676-3656-5509-0aa4-a503437f727f", 60 | "_uuid": "02d4e04a3d369c9a658334402dfcc4b84db5c0d1" 61 | }, 62 | "source": [ 63 | "Look at an image, and notice that in this dataset the images are flattened already." 64 | ] 65 | }, 66 | { 67 | "cell_type": "code", 68 | "execution_count": 3, 69 | "metadata": { 70 | "_cell_guid": "dc43b65b-d3d9-8208-e7a2-88c2535b506f", 71 | "_uuid": "2760d78352d20c5b89d8db1f384fd53dce24f12e" 72 | }, 73 | "outputs": [ 74 | { 75 | "data": { 76 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAP8AAAEICAYAAACQ6CLfAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAADs5JREFUeJzt3X+sVOWdx/HPZ4EmilRRA4sCS0GNuzZKN4Rs3MZgKo3bGLExNnWjYTXrbXYL2caFiI1GEiFZN0t3V1EMjUZqWl3iDyBd3NZf0W5IjGBopUUoEqAI4apgwSVqgO/+cQ/NLc48M8ycmTP3Pu9XQu7M+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L50haVTxepYH/eLquTm89ISL2R8RbxeMjkk5OK1/pZ5foqxJVhP9CSb8b9HyvKvwAaghJP7e9yXZf1c3UMP7ktGjF33EV93OqhtO2d9Mp08r3zGfXynT3Zasi/LWmEuql8ca/joi/lPQ3kr5bHN6iOSskTdPAHI77JS2rspliWvlnJX0vIg5X2ctgNfqq5HOrIvx7JU0a9HyipH0V9FFTROwr/vZLel4DX1N6yYGTMyQXf/sr7ucPIuJARByPiBOSfqgKP7tiWvlnJf04Ip4rFlf+2dXqq6rPrYrwvynpYttfsv0FSd+WtK6CPj7H9ujiRIxsj5b0dfXe1OPrJM0tHs+VtLbCXv5Ir0zbXm9aeVX82fXadPeVXOFXDGX8h6QRkh6PiKVdb6IG21M1sLeXBm53/kmVvdl+StIsDdzyeUDSfZLWSFotabKkPZJuioiun3ir09ssnea07R3qrd608m+ows+uzOnuS+mHy3uBPHGFH5Apwg9kivADmSL8QKYIP5Apwg9kivADmfp/k8eHm0MZA/wAAAAASUVORK5CYII=\n", 77 | "text/plain": [ 78 | "
" 79 | ] 80 | }, 81 | "metadata": { 82 | "needs_background": "light" 83 | }, 84 | "output_type": "display_data" 85 | } 86 | ], 87 | "source": [ 88 | "i=1\n", 89 | "img=np.array(train_images.iloc[i])\n", 90 | "img=img.reshape((28,28))\n", 91 | "plt.imshow(img,cmap='gray')\n", 92 | "plt.title(train_labels.iloc[i,0])\n", 93 | "plt.show()" 94 | ] 95 | }, 96 | { 97 | "cell_type": "markdown", 98 | "metadata": {}, 99 | "source": [ 100 | "Feature scaling" 101 | ] 102 | }, 103 | { 104 | "cell_type": "code", 105 | "execution_count": 4, 106 | "metadata": {}, 107 | "outputs": [], 108 | "source": [ 109 | "Xtrain = np.array(train_images)\n", 110 | "mean_px = Xtrain.mean()\n", 111 | "std_px = Xtrain.std()\n", 112 | "Xtrain = (Xtrain - mean_px)/std_px\n", 113 | "Xtest = np.array(test_images)\n", 114 | "mean_px = Xtest.mean()\n", 115 | "std_px = Xtest.std()\n", 116 | "Xtest = (Xtest - mean_px)/std_px\n", 117 | "\n", 118 | "ytrain = train_labels\n", 119 | "ytest = test_labels" 120 | ] 121 | }, 122 | { 123 | "cell_type": "markdown", 124 | "metadata": { 125 | "_uuid": "d43220552264ead15b836d41cda30e7b0d003f3c" 126 | }, 127 | "source": [ 128 | "Here is a MLP neural network from scikit-learn, using 4 layers of 128 neurons" 129 | ] 130 | }, 131 | { 132 | "cell_type": "code", 133 | "execution_count": 7, 134 | "metadata": { 135 | "_uuid": "6327b82381752f90fe39f9d33095ed04706f08a8" 136 | }, 137 | "outputs": [ 138 | { 139 | "name": "stdout", 140 | "output_type": "stream", 141 | "text": [ 142 | "0.2\n" 143 | ] 144 | } 145 | ], 146 | "source": [ 147 | "clf = MLPClassifier(solver='lbfgs', alpha=1e-4, hidden_layer_sizes=(128, 4), random_state=1)\n", 148 | "clf.fit(Xtrain,train_labels.values.ravel())\n", 149 | "print(clf.score(Xtest,test_labels))" 150 | ] 151 | }, 152 | { 153 | "cell_type": "code", 154 | "execution_count": null, 155 | "metadata": {}, 156 | "outputs": [], 157 | "source": [] 158 | } 159 | ], 160 | "metadata": { 161 | "_change_revision": 0, 162 | "_is_fork": false, 163 | "kernelspec": { 164 | "display_name": "Python 3", 165 | "language": "python", 166 | "name": "python3" 167 | }, 168 | "language_info": { 169 | "codemirror_mode": { 170 | "name": "ipython", 171 | "version": 3 172 | }, 173 | "file_extension": ".py", 174 | "mimetype": "text/x-python", 175 | "name": "python", 176 | "nbconvert_exporter": "python", 177 | "pygments_lexer": "ipython3", 178 | "version": "3.6.8" 179 | } 180 | }, 181 | "nbformat": 4, 182 | "nbformat_minor": 1 183 | } 184 | -------------------------------------------------------------------------------- /submissions/armitage2-05-2019/requirements.txt: -------------------------------------------------------------------------------- 1 | pandas 2 | numpy 3 | matplotlib 4 | sklearn 5 | --------------------------------------------------------------------------------