Skip to content

Commit

Permalink
Prepare for 3.4.4 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
MStarmans91 committed Jul 1, 2021
1 parent 8f291ca commit 80a8582
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 15 deletions.
Binary file modified WORC/doc/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified WORC/doc/_build/doctrees/static/changelog.doctree
Binary file not shown.
Binary file modified WORC/doc/_build/doctrees/static/quick_start.doctree
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
<h1>Source code for WORC.featureprocessing.Relief</h1><div class="highlight"><pre>
<span></span><span class="ch">#!/usr/bin/env python</span>

<span class="c1"># Copyright 2016-2019 Biomedical Imaging Group Rotterdam, Departments of</span>
<span class="c1"># Copyright 2016-2021 Biomedical Imaging Group Rotterdam, Departments of</span>
<span class="c1"># Medical Informatics and Radiology, Erasmus MC, Rotterdam, The Netherlands</span>
<span class="c1">#</span>
<span class="c1"># Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span>
Expand All @@ -181,7 +181,7 @@ <h1>Source code for WORC.featureprocessing.Relief</h1><div class="highlight"><pr
<span class="c1"># limitations under the License.</span>

<span class="kn">from</span> <span class="nn">sklearn.base</span> <span class="k">import</span> <span class="n">BaseEstimator</span>
<span class="kn">from</span> <span class="nn">sklearn.feature_selection.base</span> <span class="k">import</span> <span class="n">SelectorMixin</span>
<span class="kn">from</span> <span class="nn">sklearn.feature_selection</span> <span class="k">import</span> <span class="n">SelectorMixin</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">import</span> <span class="nn">sklearn.neighbors</span> <span class="k">as</span> <span class="nn">nn</span>
<span class="c1"># from skrebate import ReliefF</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
<h1>Source code for WORC.featureprocessing.SelectGroups</h1><div class="highlight"><pre>
<span></span><span class="ch">#!/usr/bin/env python</span>

<span class="c1"># Copyright 2016-2020 Biomedical Imaging Group Rotterdam, Departments of</span>
<span class="c1"># Copyright 2016-2021 Biomedical Imaging Group Rotterdam, Departments of</span>
<span class="c1"># Medical Informatics and Radiology, Erasmus MC, Rotterdam, The Netherlands</span>
<span class="c1">#</span>
<span class="c1"># Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span>
Expand All @@ -181,7 +181,7 @@ <h1>Source code for WORC.featureprocessing.SelectGroups</h1><div class="highligh
<span class="c1"># limitations under the License.</span>

<span class="kn">from</span> <span class="nn">sklearn.base</span> <span class="k">import</span> <span class="n">BaseEstimator</span>
<span class="kn">from</span> <span class="nn">sklearn.feature_selection.base</span> <span class="k">import</span> <span class="n">SelectorMixin</span>
<span class="kn">from</span> <span class="nn">sklearn.feature_selection</span> <span class="k">import</span> <span class="n">SelectorMixin</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ <h1>Source code for WORC.featureprocessing.SelectIndividuals</h1><div class="hig
<span class="c1"># limitations under the License.</span>

<span class="kn">from</span> <span class="nn">sklearn.base</span> <span class="k">import</span> <span class="n">BaseEstimator</span>
<span class="kn">from</span> <span class="nn">sklearn.feature_selection.base</span> <span class="k">import</span> <span class="n">SelectorMixin</span>
<span class="kn">from</span> <span class="nn">sklearn.feature_selection</span> <span class="k">import</span> <span class="n">SelectorMixin</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ <h1>Source code for WORC.featureprocessing.StatisticalTestThreshold</h1><div cla
<span class="c1"># limitations under the License.</span>

<span class="kn">from</span> <span class="nn">sklearn.base</span> <span class="k">import</span> <span class="n">BaseEstimator</span>
<span class="kn">from</span> <span class="nn">sklearn.feature_selection.base</span> <span class="k">import</span> <span class="n">SelectorMixin</span>
<span class="kn">from</span> <span class="nn">sklearn.feature_selection</span> <span class="k">import</span> <span class="n">SelectorMixin</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">from</span> <span class="nn">scipy.stats</span> <span class="k">import</span> <span class="n">ttest_ind</span><span class="p">,</span> <span class="n">ranksums</span><span class="p">,</span> <span class="n">mannwhitneyu</span>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ <h1>Source code for WORC.featureprocessing.VarianceThreshold</h1><div class="hig

<span class="kn">from</span> <span class="nn">sklearn.feature_selection</span> <span class="k">import</span> <span class="n">VarianceThreshold</span>
<span class="kn">from</span> <span class="nn">sklearn.base</span> <span class="k">import</span> <span class="n">BaseEstimator</span>
<span class="kn">from</span> <span class="nn">sklearn.feature_selection.base</span> <span class="k">import</span> <span class="n">SelectorMixin</span>
<span class="kn">from</span> <span class="nn">sklearn.feature_selection</span> <span class="k">import</span> <span class="n">SelectorMixin</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">import</span> <span class="nn">WORC.addexceptions</span> <span class="k">as</span> <span class="nn">ae</span>

Expand Down
2 changes: 1 addition & 1 deletion WORC/doc/_build/html/_sources/static/quick_start.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ After defining the inputs, the following code can be used to run your first expe
experiment.segmentations_from_this_directory(imagedatadir,
segmentation_file_name=segmentation_file_name)
experiment.labels_from_this_file(label_file)
experiment.predict_labels([label_name])
experiment.predict_labels(label_name)
# Use the standard workflow for your specific modus
if modus == 'binary_classification':
Expand Down
2 changes: 1 addition & 1 deletion WORC/doc/_build/html/searchindex.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions WORC/doc/_build/html/static/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,8 @@ <h2>3.4.4 - 2021-07-01<a class="headerlink" href="#id1" title="Permalink to this
<h3>Fixed<a class="headerlink" href="#fixed" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p>Bug where most recent added estimators were not valid in SimpleWORC.</p></li>
<li><p>SelectorMixin is now imported directly from sklearn.feature_selection,
as sklearn.feature_selection.base is deprecated and will be removed.</p></li>
</ul>
</div>
<div class="section" id="changed">
Expand Down
2 changes: 1 addition & 1 deletion WORC/doc/_build/html/static/quick_start.html
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ <h3>The actual experiment<a class="headerlink" href="#the-actual-experiment" tit
<span class="n">experiment</span><span class="o">.</span><span class="n">segmentations_from_this_directory</span><span class="p">(</span><span class="n">imagedatadir</span><span class="p">,</span>
<span class="n">segmentation_file_name</span><span class="o">=</span><span class="n">segmentation_file_name</span><span class="p">)</span>
<span class="n">experiment</span><span class="o">.</span><span class="n">labels_from_this_file</span><span class="p">(</span><span class="n">label_file</span><span class="p">)</span>
<span class="n">experiment</span><span class="o">.</span><span class="n">predict_labels</span><span class="p">([</span><span class="n">label_name</span><span class="p">])</span>
<span class="n">experiment</span><span class="o">.</span><span class="n">predict_labels</span><span class="p">(</span><span class="n">label_name</span><span class="p">)</span>

<span class="c1"># Use the standard workflow for your specific modus</span>
<span class="k">if</span> <span class="n">modus</span> <span class="o">==</span> <span class="s1">&#39;binary_classification&#39;</span><span class="p">:</span>
Expand Down
2 changes: 1 addition & 1 deletion WORC/doc/static/quick_start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ After defining the inputs, the following code can be used to run your first expe
experiment.segmentations_from_this_directory(imagedatadir,
segmentation_file_name=segmentation_file_name)
experiment.labels_from_this_file(label_file)
experiment.predict_labels([label_name])
experiment.predict_labels(label_name)
# Use the standard workflow for your specific modus
if modus == 'binary_classification':
Expand Down
3 changes: 3 additions & 0 deletions WORC/facade/simpleworc.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,9 @@ def predict_labels(self, label_names: list):
raise TypeError(f'label_names is of type {type(label_names)} while list is expected')

for label in label_names:
if not isinstance(label, str):
raise TypeError(f'label {label} is of type {type(label)} while str is expected')

if len(label.strip()) == 0:
raise ValueError('Invalid label, length = 0')

Expand Down
12 changes: 8 additions & 4 deletions WORC/tests/WORCTutorialSimple_travis_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,17 @@ def main():
label_file = os.path.join(data_path, 'Examplefiles', 'pinfo_HN.csv')

# Name of the label you want to predict
if modus == 'classification':
if modus == 'binary_classification':
# Classification: predict a binary (0 or 1) label
label_name = 'imaginary_label_1'
label_name = ['imaginary_label_1']

elif modus == 'regression':
# Regression: predict a continuous label
label_name = 'Age'
label_name = ['Age']

elif modus == 'multiclass_classification':
# Multiclass classification: predict several mutually exclusive binaru labels together
label_name = ['imaginary_label_1', 'complement_label_1']

# Determine whether we want to do a coarse quick experiment, or a full lengthy
# one. Again, change this accordingly if you use your own data.
Expand Down Expand Up @@ -126,7 +130,7 @@ def main():

# Labels
experiment.labels_from_this_file(label_file)
experiment.predict_labels([label_name])
experiment.predict_labels(label_name)

# Use the standard workflow for binary classification
if modus == 'classification':
Expand Down

0 comments on commit 80a8582

Please sign in to comment.