Giter Site home page Giter Site logo

divait / mindsdb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mindsdb/mindsdb

0.0 0.0 0.0 32.82 MB

Machine Learning in one line of code

Home Page: http://mindsdb.com

License: GNU General Public License v3.0

Python 97.87% Shell 1.90% Dockerfile 0.22% Batchfile 0.01%

mindsdb's Introduction

MindsDB

Python supported PyPi Version PyPi Downloads MindsDB Community MindsDB Website

MindsDB is an Explainable AutoML framework for developers built on top of Pytorch. It enables you to build, train and test state of the art ML models in as simple as one line of code. Tweet

MindsDB Linux build
Windows build
macOS build

Try it out

Installation

  • Desktop: You can use MindsDB on your own computer in under a minute, if you already have a python environment setup, just run the following command:
 pip install mindsdb --user

Note: Python 64 bit version is required. Depending on your environment, you might have to use pip3 instead of pip in the above command.*

If for some reason this fail, don't worry, simply follow the complete installation instructions which will lead you through a more thorough procedure which should fix most issues.

  • Docker: If you would like to run it all in a container simply:
sh -c "$(curl -sSL https://raw.githubusercontent.com/mindsdb/mindsdb/master/distributions/docker/build-docker.sh)"

Usage

Once you have MindsDB installed, you can use it as follows:

Import MindsDB:

from mindsdb import Predictor

One line of code to train a model:

# tell mindsDB what we want to learn and from what data
Predictor(name='home_rentals_price').learn(
    to_predict='rental_price', # the column we want to learn to predict given all the data in the file
    from_data="https://s3.eu-west-2.amazonaws.com/mindsdb-example-data/home_rentals.csv" # the path to the file where we can learn from, (note: can be url)
)

One line of code to use the model:

# use the model to make predictions
result = Predictor(name='home_rentals_price').predict(when={'number_of_rooms': 2, 'initial_price': 2000, 'number_of_bathrooms':1, 'sqft': 1190})

# you can now print the results
print('The predicted price is between ${price} with {conf} confidence'.format(price=result[0].explanation['rental_price']['confidence_interval'], conf=result[0].explanation['rental_price']['confidence']))

Visit the documentation to learn more

  • Google Colab: You can also try MindsDB straight here Google Colab

Video Tutorial

Please click on the image below to load the tutorial:

here

(Note: Please manually set it to 720p or greater to have the text appear clearly)

MindsDB Graphical User Interface

You can also work with mindsdb via its graphical user interface (download here). Please click on the image below to load the tutorial:

here

MindsDB Lightwood: Machine Learning Lego Blocks

Under the hood of mindsdb there is lightwood, a Pytorch based framework that breaks down machine learning problems into smaller blocks that can be glued together seamlessly. More info about MindsDB lightwood's on GITHUB.

Contributing

In order to make changes to mindsdb, the ideal approach is to fork the repository than clone the fork locally PYTHONPATH.

For example: export PYTHONPATH=$PYTHONPATH:/home/my_username/mindsdb.

Too test your changes you can run unit tests (fast) and CI tests (slightly longer) locally.

To run the unit tests:

  • Install pytest: pip install -r requirements_test.txt
  • Run: pytest

To run the CI tests: cd tests/ci_tests && python3 full_test.py

Once you have specific changes you want to merge into master, feel free to make a PR.

Due to some repository restructuring the "old" Mindsdb repository is now Mindsdb Native (https://github.com/mindsdb/mindsdb_native). This repository is the "old" Mindsdb Server repository, though from a user's perspective everything should work just the same.

Thanks for Max Stepanov (@StpMax) , Zoran Pandovski (@ZoranPandovski), Jorge Torres(@torrmal) for their contributions to Mindsdb Server, even though their contributions to those particular components may not show up in the commit history.

Running mindsdb as a developer

  1. Make your you have python3 and pip3 installed (one some environments pip3 might be called pip instead, if you don't have the pip3 command just run pip --version and if it says something with (python 3.x) in there that means you can use that). The version of python3 should be > 3.4.

  2. If you already installed mindsdb via pip uninstall it and all related mindsdb packages by running:

pip3 uninstall mindsdb; pip3 uninstall mindsdb_native; pip3 uninstall lightwood; sudo pip3 uninstall mindsdb; sudo pip3 uninstall mindsdb_native; sudo pip3 uninstall lightwood;

That should get rid of all local versions of mindsdb you have.

  1. Pick a directory (here I'll call it /home/my_user and clone the repository you want to use there).

For mindsdb this would be git clone [email protected]:mindsdb/mindsdb.git For native: git clone [email protected]:mindsdb/mindsdb_native.git For lightwood: git clone [email protected]:mindsdb/lightwood.git

  1. Install everything in the requirements.txt files of the project.

For mindsdb this would be cd mindsdb && pip3 install -r requirements.txt --user

  1. Add the projects you want to use to your PYTHONPATH env variable by running:

export PYTHONPATH=/home/my_user/mindsdb (replace mindsdb with mindsdb_native and lightwood for those packages)

If you want to use multiple projects at once you can add : between the directories to pythonpath, e.g.

export PYTHONPATH=/home/my_user/mindsdb_native:/home/my_user/lightwood:/home/my_user/mindsdb

Add that same export command in a new line at the end of your ~/.bashrc files to have this exported when the computer boots up in all terminals.

  1. Note, when running a script importing these libraries or running them as a python module (e.g. python3 -m mindsdb) make sure you are in a directory other than /home/my_user or /home/my_user/package_name (where package_name is mindsdb, lightwood or mindsdb_native). Otherwise the python importer will fail to properly import them

  2. If you want to install a version of mindsdb, lightwood ... etc from pip, do it in a virtualenv where you run export PYTHONPATH='', otherwise the PYTHONPATH exports will override the version installed via pip

Report Issues

Please help us by reporting any issues you may have while using MindsDB.

License

mindsdb's People

Contributors

george3d6 avatar torrmal avatar stpmax avatar zoranpandovski avatar maximlopin avatar btseytlin avatar duanzhihua avatar surendra1472 avatar dependabot[bot] avatar sk-ip avatar sreeharicodes avatar llgaetanll avatar tony avatar thiagoalmeidasa avatar ritwik12 avatar rbanffy avatar raineydavid avatar paulfantom avatar paperpanks avatar mmonfils avatar koraysaritas avatar johannesferner avatar suphero avatar andrewfarley avatar fabaff avatar dushyantrathore avatar alex-orlovskyi avatar alecgrover avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.