Skip to content

Commit

Permalink
Merge pull request #531 from mindsdb/staging
Browse files Browse the repository at this point in the history
Release 1.2.0
  • Loading branch information
George3d6 authored Sep 23, 2021
2 parents 0372d29 + 6475193 commit f0c4859
Show file tree
Hide file tree
Showing 204 changed files with 44,676 additions and 736 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@ AI.json
AI2.json

assert.sh
docssrc/build
docssrc/build/*
File renamed without changes.
56 changes: 1 addition & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,61 +4,7 @@
<br>
</h1>

![Lightwood Actions workflow](https://github.com/mindsdb/lightwood/workflows/Lightwood%20Actions%20workflow/badge.svg)
![](https://img.shields.io/badge/python-3.6%20|%203.7|%203.8-brightgreen.svg)
[![PyPI version](https://badge.fury.io/py/lightwood.svg)](https://badge.fury.io/py/lightwood)
![PyPI - Downloads](https://img.shields.io/pypi/dm/lightwood)
[![Discourse posts](https://img.shields.io/discourse/posts?server=https%3A%2F%2Fcommunity.mindsdb.com%2F)](https://community.mindsdb.com/)

Lightwood is like Legos for Machine Learning.

A Pytorch based framework that breaks down machine learning problems into smaller blocks that can be glued together seamlessly with one objective:

- Make it so simple that you can build predictive models with as little as one line of code.


# Documentation
Learn more from the [Lightwood's docs](https://docs.mindsdb.com/lightwood/info/).

## Try it out

### Installation
You can install Lightwood from pip:

```python
pip3 install lightwood
```
>Note: depending on your environment, you might have to use pip instead of pip3 in the above command.
### Usage
Given the simple sensor_data.csv let's predict sensor3 values.
| sensor1 | sensor2 | sensor3 |
|----|----|----|
| 1 | -1 | -1 |
| 0 | 1 | 0 |
| -1 |- 1 |1 |

Import [Predictor](https://mindsdb.github.io/lightwood/API/) from Lightwood
```python
from lightwood import Predictor
```

Train the model.
```python
import pandas
sensor3_predictor = Predictor(output=['sensor3']).learn(from_data=pandas.read_csv('sensor_data.csv'))
```
You can now predict what *sensor3* value will be.

```python
prediction = sensor3_predictor.predict(when={'sensor1':1, 'sensor2':-1})
```

* You can also try Lightwood in Google Colab: [![Google Colab](https://colab.research.google.com/assets/colab-badge.svg "Lightwood")](https://colab.research.google.com/drive/10W43sur_uj28ROiGuAIF9X46_Xrx1e7K)

## Contributing

Thanks for your interest. There are many ways to contribute to this project. Please, check out our [Contribution guide](https://github.com/mindsdb/lightwood/blob/master/CONTRIBUTING.md).
## Beta Version -- Stayed tuned for the final release and the new documentation

### Current contributors

Expand Down
4 changes: 4 additions & 0 deletions docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 68894c92f9919ef7a30f3f37c48c5a67
tags: 645f666f9bcd5a90fca523b33c5a78b7
Empty file added docs/.nojekyll
Empty file.
255 changes: 255 additions & 0 deletions docs/_modules/api/dtype.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,255 @@


<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>api.dtype &mdash; lightwood 1.2.0 documentation</title>



<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/custom.css" type="text/css" />










<!--[if lt IE 9]>
<script src="../../_static/js/html5shiv.min.js"></script>
<![endif]-->


<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>

<script type="text/javascript" src="../../_static/js/theme.js"></script>


<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
</head>

<body class="wy-body-for-nav">


<div class="wy-grid-for-nav">

<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" style="background: white" >



<a href="../../index.html">




<img src="../../_static/mindsdblogo.png" class="logo" alt="Logo"/>

</a>




<div class="version">
1.2.0
</div>




<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>


</div>


<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">






<p class="caption" role="heading"><span class="caption-text">Table of Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../lightwood_philosophy.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">Lightwood</span> <span class="pre">Philosophy</span></code></a></li>
<li class="toctree-l1"><a class="reference internal" href="../../tutorials.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">Tutorials</span></code></a></li>
<li class="toctree-l1"><a class="reference internal" href="../../api.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">API</span> <span class="pre">Module</span></code></a></li>
</ul>



</div>

</div>
</nav>

<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">


<nav class="wy-nav-top" aria-label="top navigation">

<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">lightwood</a>

</nav>


<div class="wy-nav-content">

<div class="rst-content">



















<div role="navigation" aria-label="breadcrumbs navigation">

<ul class="wy-breadcrumbs">

<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>

<li><a href="../index.html">Module code</a> &raquo;</li>

<li>api.dtype</li>


<li class="wy-breadcrumbs-aside">

</li>

</ul>


<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

<h1>Source code for api.dtype</h1><div class="highlight"><pre>
<div class="viewcode-block" id="dtype"><a class="viewcode-back" href="../../api/dtype.html#api.dtype.dtype">[docs]</a><span></span><span class="k">class</span> <span class="nc">dtype</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Definitions of all data types currently supported. Dtypes currently supported include:</span>

<span class="sd"> - **Numerical**: Data that should be represented in the form of a number. Currently ``integer``, ``float``, and ``quantity`` are supported.</span>
<span class="sd"> - **Categorical**: Data that represents a class or label and is discrete. Currently ``binary``, ``categorical``, and ``tags`` are supported.</span>
<span class="sd"> - **Date/Time**: Time-series data that is temporal/sequential. Currently ``date``, and ``datetime`` are supported.</span>
<span class="sd"> - **Text**: Data that can be considered as language information. Currently ``short_text``, and ``rich_text`` are supported. Short text has a small vocabulary (~ 100 words) and is generally a limited number of characters. Rich text is anything with greater complexity.</span>
<span class="sd"> - **Complex**: Data types that require custom techniques. Currently ``audio``, ``video`` and ``image`` are available, but highly experimental.</span>
<span class="sd"> - **Array**: Data in the form of a sequence where order must be preserved. Currently ``array`` is the supported type.</span>
<span class="sd"> - **Miscellaneous**: Miscellaneous data descriptors include ``empty``, an explicitly unknown value versus ``invalid``, a data type not currently supported.</span>
<span class="sd"> </span>
<span class="sd"> Custom data types may be implemented here as a flag for subsequent treatment and processing. You are welcome to include your own definitions, so long as they do not override the existing type names (alternatively, if you do, please edit subsequent parts of the preprocessing pipeline to correctly indicate how you want to deal with these data types).</span>
<span class="sd"> &quot;&quot;&quot;</span> <span class="c1"># noqa</span>

<span class="c1"># Numerical type data</span>
<span class="n">integer</span> <span class="o">=</span> <span class="s2">&quot;integer&quot;</span>
<span class="nb">float</span> <span class="o">=</span> <span class="s2">&quot;float&quot;</span>
<span class="n">quantity</span> <span class="o">=</span> <span class="s2">&quot;quantity&quot;</span>

<span class="c1"># Categorical type data</span>
<span class="n">binary</span> <span class="o">=</span> <span class="s2">&quot;binary&quot;</span>
<span class="n">categorical</span> <span class="o">=</span> <span class="s2">&quot;categorical&quot;</span>
<span class="n">tags</span> <span class="o">=</span> <span class="s2">&quot;tags&quot;</span>

<span class="c1"># Dates and Times (time-series)</span>
<span class="n">date</span> <span class="o">=</span> <span class="s2">&quot;date&quot;</span>
<span class="n">datetime</span> <span class="o">=</span> <span class="s2">&quot;datetime&quot;</span>

<span class="c1"># Text</span>
<span class="n">short_text</span> <span class="o">=</span> <span class="s2">&quot;short_text&quot;</span>
<span class="n">rich_text</span> <span class="o">=</span> <span class="s2">&quot;rich_text&quot;</span>

<span class="c1"># Complex Data types</span>
<span class="n">image</span> <span class="o">=</span> <span class="s2">&quot;image&quot;</span>
<span class="n">audio</span> <span class="o">=</span> <span class="s2">&quot;audio&quot;</span>
<span class="n">video</span> <span class="o">=</span> <span class="s2">&quot;video&quot;</span>

<span class="c1"># Series/Sequences</span>
<span class="n">array</span> <span class="o">=</span> <span class="s2">&quot;array&quot;</span>

<span class="c1"># Misc (Unk/NaNs)</span>
<span class="n">empty</span> <span class="o">=</span> <span class="s2">&quot;empty&quot;</span>
<span class="n">invalid</span> <span class="o">=</span> <span class="s2">&quot;invalid&quot;</span></div>

</pre></div>

</div>

</div>
<footer>

<hr/>

<div role="contentinfo">
<p>
&#169; Copyright 2017-2021, MindsDB.

</p>
</div>



Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a

<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>

provided by <a href="https://readthedocs.org">Read the Docs</a>.

</footer>
</div>
</div>

</section>

</div>


<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>






</body>
</html>
Loading

0 comments on commit f0c4859

Please sign in to comment.