Code Monkey home page Code Monkey logo

shallowlearning-bostonhouses's Introduction

Aula 03 Semana Data Science

Predict boston house prices using shallow learning

Lib para criação de DataApps de forma simples: streamlit via pip para executar o streamlit: $ streamlit run app.py

Pandas Profilling install: pip install https://github.com/pandas-profiling/pandas-profiling/archive/master.zip

Criando o VENV:

   # Vem instalado com o PIP, não precisa instalar o VirtualEnv
   MACOS
   $ virtualenv -p python3 venv

   # Windows (Gitbash)
   $ cd /c/Projects/semana-datascience
   $ virtualenv -p python3 venv

Ativando o VENV (faça isso toda vez que for executar o projeto):

    MACOS
    $ source venv/bin/activate

    # Windows (Prompt)
    > cd C:\Projects\semana-datascience
    > venv\Scripts\activate.bat

Running backend server (Flask)

$ flask run --host=0.0.0.0

$ FLASK_ENV=development flask run -h 0.0.0.0

*Download it Datasets from GOOGLE DRIVE (add it to: automated-programming/datasets)

Preparação do Ambiente

  1. Instalar o python3 via gerenciador de pacote do Sistema Operacional

      # MacOS X
      $ brew install python3
    
      # Linux
      $ apt-get install python3
    
      # Windows 10 (GitBash)
      $ /c/Users/ilton/AppData/Local/Programs/Python/Python38/python.exe -m pip install --upgrade pip
  2. Remover o elo (link) do python2 para tornar o python3 como default

      # MacOS X
      $ nano ~/.bash_profile
      $ nano ~/.zprofile
    
      # Ubuntu
      $ nano ~/.bashrc

    $ sudo nano ~/.zprofile

      # bash_profile AND .zshrc
    
      # aliases
      alias pip=pip3
      alias python=python3
    

    // if dont want to use zsh, add it to bash_profile: [[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile

  3. Configuração do Virtual Env (VENV)

    1. Criação do VENV

         # Vem instalado com o PIP, não precisa instalar o VirtualEnv
         $ virtualenv -p python3 venv
    2. Ativando o VENV (faça isso toda vez que for executar o projeto)

          # MacOS
          $ source venv/bin/activate
      
          # Windows (Gitbash)
          $ /c/Projects/gaesi/msdaf/predictive/venv/Scripts/activate.bat
          # Windows (Prompt)
          > cd C:\Projects\gaesi\msdaf\predictive
          > venv\Scripts\activate.bat
  4. Instalando as dependências com as versões unificadas

        # MAC
        $ pip install -r requirements_mac.txt
        # WINDOWS
        $ pip install -r requirements_win.txt   
  5. CASO ocorra erro no pandas profilling:

        $ pip install https://github.com/pandas-profiling/pandas-profiling/archive/master.zip
  6. Criando o Kernel para o jupyter para que ele "visualize" as dependências instaladas

        $ ipython kernel install --user --name=ms_daf
  7. Selecionando o Kernel no Jupyter

    Jupyter Kernel Selection img

  8. SE NÃO INSTALAR CORRETAMENTE SIGA OS PRÓXIMOS PASSOS

  9. Instalar o jupyter (execute esses comandos com o VENV ativo)

      # Todos Sistemas Operacionais
      $ pip install jupyter notebook
      $ pip freeze > requirements.txt
    
      # MAC
      $ pip freeze > requirements_mac.txt
      # WINDOWS
      $ pip freeze > requirements_win.txt
  10. Instalando a dependencia da computação em núvem (floydhub):

      # Todos Sistemas Operacionais
      $ pip install -U floyd-cli
  11. Instalar o gerenciador de extensões do jupyter

        $ pip install jupyter_contrib_nbextensions

OBSERVAÇÃO: Não atualize (upgrade) o pip! O tensorflow 1.9 é compatível com o pip instalado neste processo! Caso faça o Upgrade, execute o comando a seguir, com o env ativo:

 $ sudo pip install --force-reinstall pip==10.0.1

Se aparecer stacktrace no import do tensorflow no arg async significa que existem 2 pythons interpreters rodando o tensorflow e você deve executar um uninstall do tensorflow fora do env conda:

 $ deactivate
 $ pip uninstall tensorflow

HOSTS

edit /etc/hosts

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
# Added by Docker Desktop
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
# End of section

127.0.0.1  docker discovery cassandra rabbit gateway documents ui oracle jupyter
127.0.0.1  modulos redis identidades elk onlyoffice elasticsearch dashboard kibana
127.0.0.1  integracoes-gateway integracoes-documents integracoes-ui sinprocesso
127.0.0.1  integracoes-modulos integracoes-identidades
127.0.0.1  integracoes-configserver integracoes-discovery

PyCharm

Settings > Project Structure > Exclude Folders: data & microsets

GENERATING MODELS

Run it notebook: http://localhost:8888/notebooks/automated-programming/CEAF/CEAF_AIRunner_FactoryModels.ipynb

shallowlearning-bostonhouses's People

Contributors

tongarcia avatar

Watchers

James Cloos avatar  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.