Skip to content

Commit

Permalink
updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fracpete committed Feb 21, 2024
1 parent 6077583 commit 322c4f7
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 50 deletions.
32 changes: 13 additions & 19 deletions _sources/install.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ https://groups.google.com/forum/#!forum/python-weka-wrapper
Prerequisites for all platforms
-------------------------------

You need a Java Development Kit (JDK) 8 or later (e.g., `OpenJDK <https://adoptopenjdk.net/>`__) installed and
You need a Java Development Kit (JDK) 8 or later (e.g., `OpenJDK <https://adoptium.net//>`__) installed and
the ``JAVA_HOME`` `environment variable
<http://docs.oracle.com/cd/E19182-01/820-7851/inst_cli_jdk_javahome_t/index.html>`__
pointing to the installation directory in order to use *python-weka-wrapper3*
Expand Down Expand Up @@ -245,18 +245,18 @@ Windows using Anaconda
is consistent. I.e., if you install a 32-bit version of Anaconda, you need to
install a 32-bit JDK (or all of them are 64-bit).

* download `python-javabridge <https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-javabridge>`__
(or later) for Python 3.7/3.8/3.9/3.10 (*cp37/cp38/cp39/310*) and your *bitness* (32 or 64 bit)

* the following sets up an environment with Python 3.9
* set the `JDK_HOME` environment variable to point at the same directory as `JAVA_HOME`
* download and install the `Visual C++ Build Tools <https://visualstudio.microsoft.com/visual-cpp-build-tools/>`__,
select the **Desktop development with C++** option in the installer
* the following configures an environment with Python 3.10 (3.11+ does not work at this stage)

.. code-block:: doscon
> conda create --name pww3 python=3.9
> conda create --name pww3 python=3.10
> conda activate pww3
> conda install -c conda-forge numpy
> conda install -c conda-forge pillow
> pip install python-javabridge-X.Y.Z.whl # adjust path to where you downloaded the file
> pip install python-javabridge
> pip install python-weka-wrapper3
If you want plotting support, then install also *graphviz* and *matplotlib*:
Expand All @@ -276,24 +276,18 @@ install a 32-bit JDK and 32-bit numpy (or all of them are 64-bit).

Perform the following steps:

* install `Python <http://www.python.org/downloads>`__, make sure you check *Add python.exe to path* during the installation
* set the `JDK_HOME` environment variable to point at the same directory as `JAVA_HOME`
* download and install the `Visual C++ Build Tools <https://visualstudio.microsoft.com/visual-cpp-build-tools/>`__,
select the **Desktop development with C++** option in the installer
* install `Python <http://www.python.org/downloads>`__ (<=3.10), make sure you check *Add python.exe to path* during the installation
* add the Python scripts directory to your ``PATH`` environment variable, e.g., ``C:\\Python35\\Scripts``
* install ``pip`` with these steps:

* download from `here <https://bootstrap.pypa.io/get-pip.py>`__
* install using ``python get-pip.py``

* install numpy

* download `numpy 1.9.x MKL <http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy>`__
(or later) for Python 3.7/3.8/3.9/3.10 (*cp37/cp38/cp39/cp310*) and your *bitness* (32 or 64 bit)
* install the *.whl* file using pip: ``pip install numpy-X.Y.Z.whl``

* install python-javabridge

* download `python-javabridge <https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-javabridge>`__
(or later) for Python 3.7/3.8/3.9/3.10 (*cp37/cp38/cp39/310*) and your *bitness* (32 or 64 bit)
* install the *.whl* file using pip: ``pip install python-javabridge-X.Y.Z.whl``
* install numpy with `pip install numpy`
* install python-javabridge with `pip install python-javabridge`

If you want to use the plotting functionality, you need to install *graphviz* and *matplotlib* as well:

Expand Down
4 changes: 3 additions & 1 deletion genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -1293,10 +1293,12 @@ <h2 id="L">L</h2>
</li>
</ul></li>
<li><a href="weka.core.html#weka.core.converters.load_any_file">load_any_file() (in module weka.core.converters)</a>
</li>
<li><a href="weka.html#weka.timeseries.TSForecaster.load_base_model">load_base_model() (weka.timeseries.TSForecaster method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="weka.html#weka.timeseries.TSForecaster.load_base_model">load_base_model() (weka.timeseries.TSForecaster method)</a>
<li><a href="weka.core.html#weka.core.converters.load_csv_file">load_csv_file() (in module weka.core.converters)</a>
</li>
<li><a href="weka.core.html#weka.core.converters.Loader.load_file">load_file() (weka.core.converters.Loader method)</a>
</li>
Expand Down
38 changes: 13 additions & 25 deletions install.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h1>Installation<a class="headerlink" href="#installation" title="Permalink to t
<p><a class="reference external" href="https://groups.google.com/forum/#!forum/python-weka-wrapper">https://groups.google.com/forum/#!forum/python-weka-wrapper</a></p>
<section id="prerequisites-for-all-platforms">
<h2>Prerequisites for all platforms<a class="headerlink" href="#prerequisites-for-all-platforms" title="Permalink to this headline"></a></h2>
<p>You need a Java Development Kit (JDK) 8 or later (e.g., <a class="reference external" href="https://adoptopenjdk.net/">OpenJDK</a>) installed and
<p>You need a Java Development Kit (JDK) 8 or later (e.g., <a class="reference external" href="https://adoptium.net//">OpenJDK</a>) installed and
the <code class="docutils literal notranslate"><span class="pre">JAVA_HOME</span></code> <a class="reference external" href="http://docs.oracle.com/cd/E19182-01/820-7851/inst_cli_jdk_javahome_t/index.html">environment variable</a>
pointing to the installation directory in order to use <em>python-weka-wrapper3</em>
library.</p>
Expand Down Expand Up @@ -220,14 +220,15 @@ <h2>Windows using Anaconda<a class="headerlink" href="#windows-using-anaconda" t
is consistent. I.e., if you install a 32-bit version of Anaconda, you need to
install a 32-bit JDK (or all of them are 64-bit).</p>
<ul>
<li><p>download <a class="reference external" href="https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-javabridge">python-javabridge</a>
(or later) for Python 3.7/3.8/3.9/3.10 (<em>cp37/cp38/cp39/310</em>) and your <em>bitness</em> (32 or 64 bit)</p></li>
<li><p>the following sets up an environment with Python 3.9</p>
<div class="highlight-doscon notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;</span> conda create --name pww3 python=3.9
<li><p>set the <cite>JDK_HOME</cite> environment variable to point at the same directory as <cite>JAVA_HOME</cite></p></li>
<li><p>download and install the <a class="reference external" href="https://visualstudio.microsoft.com/visual-cpp-build-tools/">Visual C++ Build Tools</a>,
select the <strong>Desktop development with C++</strong> option in the installer</p></li>
<li><p>the following configures an environment with Python 3.10 (3.11+ does not work at this stage)</p>
<div class="highlight-doscon notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;</span> conda create --name pww3 python=3.10
<span class="gp">&gt;</span> conda activate pww3
<span class="gp">&gt;</span> conda install -c conda-forge numpy
<span class="gp">&gt;</span> conda install -c conda-forge pillow
<span class="gp">&gt;</span> pip install python-javabridge-X.Y.Z.whl # adjust path to where you downloaded the file
<span class="gp">&gt;</span> pip install python-javabridge
<span class="gp">&gt;</span> pip install python-weka-wrapper3
</pre></div>
</div>
Expand All @@ -248,7 +249,10 @@ <h2>Windows<a class="headerlink" href="#windows" title="Permalink to this headli
install a 32-bit JDK and 32-bit numpy (or all of them are 64-bit).</p>
<p>Perform the following steps:</p>
<ul class="simple">
<li><p>install <a class="reference external" href="http://www.python.org/downloads">Python</a>, make sure you check <em>Add python.exe to path</em> during the installation</p></li>
<li><p>set the <cite>JDK_HOME</cite> environment variable to point at the same directory as <cite>JAVA_HOME</cite></p></li>
<li><p>download and install the <a class="reference external" href="https://visualstudio.microsoft.com/visual-cpp-build-tools/">Visual C++ Build Tools</a>,
select the <strong>Desktop development with C++</strong> option in the installer</p></li>
<li><p>install <a class="reference external" href="http://www.python.org/downloads">Python</a> (&lt;=3.10), make sure you check <em>Add python.exe to path</em> during the installation</p></li>
<li><p>add the Python scripts directory to your <code class="docutils literal notranslate"><span class="pre">PATH</span></code> environment variable, e.g., <code class="docutils literal notranslate"><span class="pre">C:\\Python35\\Scripts</span></code></p></li>
<li><p>install <code class="docutils literal notranslate"><span class="pre">pip</span></code> with these steps:</p></li>
</ul>
Expand All @@ -259,25 +263,9 @@ <h2>Windows<a class="headerlink" href="#windows" title="Permalink to this headli
</ul>
</div></blockquote>
<ul class="simple">
<li><p>install numpy</p></li>
<li><p>install numpy with <cite>pip install numpy</cite></p></li>
<li><p>install python-javabridge with <cite>pip install python-javabridge</cite></p></li>
</ul>
<blockquote>
<div><ul class="simple">
<li><p>download <a class="reference external" href="http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy">numpy 1.9.x MKL</a>
(or later) for Python 3.7/3.8/3.9/3.10 (<em>cp37/cp38/cp39/cp310</em>) and your <em>bitness</em> (32 or 64 bit)</p></li>
<li><p>install the <em>.whl</em> file using pip: <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">numpy-X.Y.Z.whl</span></code></p></li>
</ul>
</div></blockquote>
<ul class="simple">
<li><p>install python-javabridge</p></li>
</ul>
<blockquote>
<div><ul class="simple">
<li><p>download <a class="reference external" href="https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-javabridge">python-javabridge</a>
(or later) for Python 3.7/3.8/3.9/3.10 (<em>cp37/cp38/cp39/310</em>) and your <em>bitness</em> (32 or 64 bit)</p></li>
<li><p>install the <em>.whl</em> file using pip: <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">python-javabridge-X.Y.Z.whl</span></code></p></li>
</ul>
</div></blockquote>
<p>If you want to use the plotting functionality, you need to install <em>graphviz</em> and <em>matplotlib</em> as well:</p>
<ul class="simple">
<li><p>download <a class="reference external" href="https://graphviz.org/download/#windows">graphviz</a>
Expand Down
Binary file modified objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

31 changes: 27 additions & 4 deletions weka.core.html
Original file line number Diff line number Diff line change
Expand Up @@ -2205,6 +2205,27 @@ <h1>weka.core package<a class="headerlink" href="#weka-core-package" title="Perm
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="weka.core.converters.load_csv_file">
<span class="sig-prename descclassname"><span class="pre">weka.core.converters.</span></span><span class="sig-name descname"><span class="pre">load_csv_file</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filename</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dialect</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'excel'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">delimiter</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">','</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">quotechar</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'&quot;'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">num_cols</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#weka.core.converters.load_csv_file" title="Permalink to this definition"></a></dt>
<dd><p>Loads a CSV file using the Python csv module and then converts it
to an Instances object. Better at reading CSV files than Weka’s
built-in CSVLoader. String attributes can be converted to nominal
ones using the weka.filters.unsupervised.attribute.StringToNominal filter.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>filename</strong> (<em>str</em>) – the name of the CSV file to load</p></li>
<li><p><strong>dialect</strong> (<em>str</em>) – the type of CSV file to load</p></li>
<li><p><strong>delimiter</strong> (<em>str</em>) – the field delimiter</p></li>
<li><p><strong>quotechar</strong> (<em>str</em>) – the character used for quoting cells</p></li>
<li><p><strong>quoting</strong> – how the quoting works</p></li>
<li><p><strong>num_cols</strong> (<em>list</em>) – the list of 0-based column indices that are numeric, default for cols is str</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="weka.core.converters.loader_for_file">
<span class="sig-prename descclassname"><span class="pre">weka.core.converters.</span></span><span class="sig-name descname"><span class="pre">loader_for_file</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filename</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#weka.core.converters.loader_for_file" title="Permalink to this definition"></a></dt>
Expand Down Expand Up @@ -4075,7 +4096,8 @@ <h1>weka.core package<a class="headerlink" href="#weka-core-package" title="Perm
<span class="sig-prename descclassname"><span class="pre">weka.core.dataset.</span></span><span class="sig-name descname"><span class="pre">create_instances_from_lists</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'data'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cols_x</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">col_y</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#weka.core.dataset.create_instances_from_lists" title="Permalink to this definition"></a></dt>
<dd><p>Allows the generation of an Instances object from a list of lists for X and a list for Y (optional).
Data can be numeric, string or bytes. Attributes can be converted to nominal with the
weka.filters.unsupervised.attribute.NumericToNominal filter.</p>
weka.filters.unsupervised.attribute.NumericToNominal filter.
None values are interpreted as missing values.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
Expand All @@ -4101,12 +4123,13 @@ <h1>weka.core package<a class="headerlink" href="#weka-core-package" title="Perm
<dd><p>Allows the generation of an Instances object from a 2-dimensional matrix for X and a
1-dimensional matrix for Y (optional).
Data can be numeric, string or bytes. Attributes can be converted to nominal with the
weka.filters.unsupervised.attribute.NumericToNominal filter.</p>
weka.filters.unsupervised.attribute.NumericToNominal filter.
nan values are interpreted as missing values.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>x</strong> (<em>ndarray</em>) – the input variables</p></li>
<li><p><strong>y</strong> (<em>ndarray</em>) – the output variable (optional)</p></li>
<li><p><strong>x</strong> (<em>np.ndarray</em>) – the input variables</p></li>
<li><p><strong>y</strong> (<em>np.ndarray</em>) – the output variable (optional)</p></li>
<li><p><strong>name</strong> (<em>str</em>) – the name of the dataset</p></li>
<li><p><strong>cols_x</strong> (<em>list</em>) – the column names to use</p></li>
<li><p><strong>col_y</strong> (<em>str</em>) – the column name to use for the output variable (y)</p></li>
Expand Down

0 comments on commit 322c4f7

Please sign in to comment.