Skip to content

Commit

Permalink
full refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Palashio committed Jul 5, 2020
1 parent b13da30 commit b44892b
Show file tree
Hide file tree
Showing 50 changed files with 219 additions and 219 deletions.
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
name: b) New feature
about: Select this if you're adding a new feature to verve.
about: Select this if you're adding a new feature to libra.
labels: feature
---

<!--
Please make sure you've read and understood our contributing guidelines;
https://github.com/Palashio/verve/CONTRIBUTING.md
https://github.com/Palashio/libra/CONTRIBUTING.md
-->

This pull request closes #issue_number_here .
Expand All @@ -24,4 +24,4 @@ including tests for the new feature you added.

- [ ] I updated the docs.

This pull request adds a new feature to verve. @Palashio, could you please take a look at it?
This pull request adds a new feature to libra. @Palashio, could you please take a look at it?
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Guidelines for contributing to verve will come soon.
Guidelines for contributing to libra will come soon.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
## INITIAL BUILD RELEASE DATE: JULY 16TH.
in progress....this README.md is out of date. Documentation site coming soon.

# Verve: Deep Learning fluent in one-liners
# libra: Deep Learning fluent in one-liners

Verve is a deep learning API that allows users to use machine learning in their workflows in fluent one-liners. It is written in Python and TensorFlow and makes training neural networks as simple as a one line function call. It was written to make deep learning as simple as possible to every user.
libra is a deep learning API that allows users to use machine learning in their workflows in fluent one-liners. It is written in Python and TensorFlow and makes training neural networks as simple as a one line function call. It was written to make deep learning as simple as possible to every user.
***

## Guiding Principles ##
* **Beginner Friendly.** verve is an API designed to be used by developers with no deep learning experience whatsoever. It is built so that users with no knowledge in preprocessing, modeling, or tuning can build high-performance models with ease without worrying about the details of implementation.
* **Beginner Friendly.** libra is an API designed to be used by developers with no deep learning experience whatsoever. It is built so that users with no knowledge in preprocessing, modeling, or tuning can build high-performance models with ease without worrying about the details of implementation.

* **Quick Integration.** With the recent rise of machine learning on the cloud, the developer community has failed to make easy-to-use platforms that exist locally and integrate directly into workflows. verve allows users to develop models directly in programs with hundreds of API endpoints without having to worry about the transition to the cloud.
* **Quick Integration.** With the recent rise of machine learning on the cloud, the developer community has failed to make easy-to-use platforms that exist locally and integrate directly into workflows. libra allows users to develop models directly in programs with hundreds of API endpoints without having to worry about the transition to the cloud.

* **Automation.** End-to-end pipelines containing hundreds of processes are automatically run for the user. The developer only has to consider what they want to accomplish from the task and the location of their initial dataset.

Expand Down Expand Up @@ -54,7 +54,7 @@ Generally, all queries have the same structure. You should always be passing an
Let's start with the most basic query. This will build a feed-forward network for a continuous label that you specify.

```python
import verve
import libra

newClient = client('dataset')
newClient.regression_query_ann('Model the median house value')
Expand Down Expand Up @@ -235,9 +235,9 @@ If you'd like to get the best pipeline for dimensionality reduction you can call
dimensionality_reduc("I want to estimate number of crime", path_to_dataset)

```
Instructions like "I want to model x" are provided in the dimensionality reduction pipeline because it identifies which prediction objective you would like to maximize the accuracy for. Providing this instruction helps verve provide users with the best modification pipeline.
Instructions like "I want to model x" are provided in the dimensionality reduction pipeline because it identifies which prediction objective you would like to maximize the accuracy for. Providing this instruction helps libra provide users with the best modification pipeline.

verve current supports feature importance identification using random forest regressor, indepedent component analysis, and principle component analysis. The output of the dimensionalityReduc() function should look something like this:
libra current supports feature importance identification using random forest regressor, indepedent component analysis, and principle component analysis. The output of the dimensionalityReduc() function should look something like this:

```
Baseline Accuracy: 0.9752906976744186
Expand Down Expand Up @@ -299,7 +299,7 @@ If this does not converge a message will be displayed for users to warn them by

## Process Logger ##

verve will automatically output the current process running in a hierarchial format like this:
libra will automatically output the current process running in a hierarchial format like this:

```
loading dataset...
Expand All @@ -321,9 +321,9 @@ A quiet mode feature is currently being implemented.

## Pipelining for Contributors ##

In order to help make verve extensible, a process pipeliner has been implemented to help contributors easily test their newly-developed modules.
In order to help make libra extensible, a process pipeliner has been implemented to help contributors easily test their newly-developed modules.

Let's say you've developed a different preprocesser for data that you want to test before integrating it into verve's primary workflow. This is the process to test it out:
Let's say you've developed a different preprocesser for data that you want to test before integrating it into libra's primary workflow. This is the process to test it out:

First, you want to initialize your base parameters, which are your instructions, the path to your dataset, and any other information your new function might require.

Expand Down Expand Up @@ -359,7 +359,7 @@ All model information should be stored in ```init_params```. If you'd like to mo
***
## Instructions ##

verve uses intelligent natural language processing to analyze user instructions and match it with a column in user datasets.
libra uses intelligent natural language processing to analyze user instructions and match it with a column in user datasets.
1. [Textblob](https://textblob.readthedocs.io/en/dev/), a part of speech recognition algorithm, is used to identify parts of speech.
2. A self-developed part-of-speech deciphering algorithm is used to extract relevant parts of a sentence.
3. Masks are generated to represent all words as tensors in order for easy comparison
Expand All @@ -368,4 +368,4 @@ verve uses intelligent natural language processing to analyze user instructions

## Example Projects ##

To get started, take a look at some of these examples of data science projects analyzing datasets using verve.
To get started, take a look at some of these examples of data science projects analyzing datasets using libra.
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN wget --quiet --no-check-certificate https://repo.continuum.io/miniconda/Mini
echo export PATH=$CONDA_DIR/bin:'$PATH' > /etc/profile.d/conda.sh

# Install Python packages and keras
ENV NB_USER verve
ENV NB_USER libra
ENV NB_UID 1000

RUN useradd -m -s /bin/bash -N -u $NB_UID $NB_USER && \
Expand Down Expand Up @@ -75,7 +75,7 @@ RUN conda install -y python=${python_version} && \
theano \
mkdocs \
&& \
git clone git://github.com/Palashio/verve.git /src && pip install -e /src[tests] && pip install git+git://github.com/Palashio/verve.git && \
git clone git://github.com/Palashio/libra.git /src && pip install -e /src[tests] && pip install git+git://github.com/Palashio/libra.git && \
conda clean -yt; exit 0

ENV LC_ALL=C.UTF-8
Expand Down
10 changes: 5 additions & 5 deletions docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ TEST=tests/
SRC?=$(shell dirname `pwd`)

build:
docker build -t verve --build-arg python_version=$(PYTHON_VERSION) --build-arg cuda_version=$(CUDA_VERSION) --build-arg cudnn_version=$(CUDNN_VERSION) -f $(DOCKER_FILE) .
docker build -t libra --build-arg python_version=$(PYTHON_VERSION) --build-arg cuda_version=$(CUDA_VERSION) --build-arg cudnn_version=$(CUDNN_VERSION) -f $(DOCKER_FILE) .

bash: build
$(DOCKER) run -it -v $(SRC):/src/workspace -v $(DATA):/data --env verve_BACKEND=$(BACKEND) verve bash
$(DOCKER) run -it -v $(SRC):/src/workspace -v $(DATA):/data --env libra_BACKEND=$(BACKEND) libra bash

ipython: build
$(DOCKER) run -it -v $(SRC):/src/workspace -v $(DATA):/data --env verve_BACKEND=$(BACKEND) verve ipython
$(DOCKER) run -it -v $(SRC):/src/workspace -v $(DATA):/data --env libra_BACKEND=$(BACKEND) libra ipython

notebook: build
$(DOCKER) run -it -v $(SRC):/src/workspace -v $(DATA):/data --net=host --env verve_BACKEND=$(BACKEND) verve
$(DOCKER) run -it -v $(SRC):/src/workspace -v $(DATA):/data --net=host --env libra_BACKEND=$(BACKEND) libra

test: build
$(DOCKER) run -it -v $(SRC):/src/workspace -v $(DATA):/data --env verve_BACKEND=$(BACKEND) verve py.test $(TEST)
$(DOCKER) run -it -v $(SRC):/src/workspace -v $(DATA):/data --env libra_BACKEND=$(BACKEND) libra py.test $(TEST)
4 changes: 2 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Using verve via Docker
# Using libra via Docker

This directory contains `Dockerfile` to make it easy to get up and running with
verve via [Docker](http://www.docker.com/).
libra via [Docker](http://www.docker.com/).

## Installing Docker

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@
from sklearn.preprocessing import OneHotEncoder, StandardScaler
from tensorflow import keras
from tensorflow.python.keras.layers import Dense, Input
from verve.data_generation.dataset_labelmatcher import get_similar_column, get_similar_model
from libra.data_generation.dataset_labelmatcher import get_similar_column, get_similar_model
from keras.callbacks import EarlyStopping
from matplotlib import pyplot
from verve.data_generation.grammartree import get_value_instruction
from verve.preprocessing.data_preprocesser import structured_preprocesser
from verve.modeling.prediction_model_creation import get_keras_model_reg
from verve.modeling.prediction_model_creation import get_keras_model_class
from libra.data_generation.grammartree import get_value_instruction
from libra.preprocessing.data_preprocesser import structured_preprocesser
from libra.modeling.prediction_model_creation import get_keras_model_reg
from libra.modeling.prediction_model_creation import get_keras_model_class
from keras.utils import to_categorical
from keras.utils import np_utils
from sklearn.cluster import KMeans
import matplotlib.pyplot as plt

from verve.data_generation import dataGen
from libra.data_generation import dataGen
from keras.models import Sequential
from keras.layers import (Dense, Conv2D, Flatten)
from os import listdir
from verve.modeling.tuner import tuneReg, tuneClass, tuneCNN
from libra.modeling.tuner import tuneReg, tuneClass, tuneCNN
from sklearn.neighbors import KNeighborsClassifier
from sklearn.ensemble import RandomForestRegressor
from sklearn.feature_selection import SelectFromModel
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import spacy
from spacy.lang.en import English
from nltk.corpus import stopwords
from verve.data_generation.dataset_labelmatcher import get_similar_column
from verve.data_generation.grammartree import get_value_instruction
from libra.data_generation.dataset_labelmatcher import get_similar_column
from libra.data_generation.grammartree import get_value_instruction


def get_target_values(data, instruction, yLabel):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
from sklearn.preprocessing import (OneHotEncoder,
StandardScaler,
FunctionTransformer)
from verve.data_generation.dataset_labelmatcher import get_similar_column
from verve.data_generation.grammartree import get_value_instruction
from libra.data_generation.dataset_labelmatcher import get_similar_column
from libra.data_generation.grammartree import get_value_instruction
from prince.ca import CA

from nltk.stem import WordNetLemmatizer
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import cv2
import glob
import pandas as pd
from verve.data_generation.dataset_labelmatcher import get_similar_column
from verve.data_generation.grammartree import get_value_instruction
from libra.data_generation.dataset_labelmatcher import get_similar_column
from libra.data_generation.grammartree import get_value_instruction

# Preprocesses images from images to median of heighs/widths

Expand Down
16 changes: 8 additions & 8 deletions verve/queries.py → libra/queries.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
from verve.query.nlp_queries import (image_caption_query,
from libra.query.nlp_queries import (image_caption_query,
generate_caption, classify_text,
text_classification_query, get_summary,
summarization_query)
from verve.query.classification_models import (k_means_clustering,
from libra.query.classification_models import (k_means_clustering,
train_svm, nearest_neighbors,
decision_tree)

from verve.query.supplementaries import tune_helper, get_model_data, get_operators, get_accuracy, get_losses, get_target, get_plots, get_vocab
from libra.query.supplementaries import tune_helper, get_model_data, get_operators, get_accuracy, get_losses, get_target, get_plots, get_vocab

from verve.query.feedforward_nn import (regression_ann,
from libra.query.feedforward_nn import (regression_ann,
classification_ann,
convolutional)
from verve.data_generation.grammartree import get_value_instruction
from verve.data_generation.dataset_labelmatcher import (get_similar_column,
from libra.data_generation.grammartree import get_value_instruction
from libra.data_generation.dataset_labelmatcher import (get_similar_column,
get_similar_model)
from verve.plotting.generate_plots import analyze
from libra.plotting.generate_plots import analyze
from colorama import Fore, Style
import pandas as pd
from pandas.core.common import SettingWithCopyWarning
Expand Down Expand Up @@ -829,4 +829,4 @@ def analyze(self, model=None):
if model is None:
model = self.latest_model
clearLog()
analyze(self, model)
analyze(self, model)
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import pandas as pd
from verve.preprocessing.data_reader import DataReader
from libra.preprocessing.data_reader import DataReader
from sklearn import svm, tree
from sklearn.metrics import accuracy_score
from verve.preprocessing.data_preprocesser import initial_preprocesser, clustering_preprocessor
from libra.preprocessing.data_preprocesser import initial_preprocesser, clustering_preprocessor
from sklearn.cluster import KMeans
from sklearn.neighbors import KNeighborsClassifier
from sklearn.model_selection import cross_val_score
import numpy as np
from verve.query.supplementaries import generate_id
from verve.plotting.generate_plots import (generate_clustering_plots)
from libra.query.supplementaries import generate_id
from libra.plotting.generate_plots import (generate_clustering_plots)
from colorama import Fore, Style
import warnings

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from sklearn.feature_selection import SelectFromModel
from sklearn import preprocessing, tree
from itertools import product, permutations
from verve.preprocessing.data_reader import DataReader
from libra.preprocessing.data_reader import DataReader
import os
from sklearn.ensemble import RandomForestRegressor
from verve.preprocessing.data_preprocesser import structured_preprocesser, initial_preprocesser
from verve.data_generation.grammartree import get_value_instruction
from verve.data_generation.dataset_labelmatcher import get_similar_column
from libra.preprocessing.data_preprocesser import structured_preprocesser, initial_preprocesser
from libra.data_generation.grammartree import get_value_instruction
from libra.data_generation.dataset_labelmatcher import get_similar_column

from xgboost import XGBClassifier

Expand Down
12 changes: 6 additions & 6 deletions verve/query/feedforward_nn.py → libra/query/feedforward_nn.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
from colorama import Fore, Style
from tensorflow.keras.callbacks import EarlyStopping
import os
from verve.preprocessing.image_preprocesser import (setwise_preprocessing,
from libra.preprocessing.image_preprocesser import (setwise_preprocessing,
csv_preprocessing,
classwise_preprocessing,
set_distinguisher,
already_processed)
from verve.preprocessing.data_reader import DataReader
from libra.preprocessing.data_reader import DataReader
from keras.models import Sequential
from keras.layers import (Dense, Conv2D, Flatten, MaxPooling2D, )
import pandas as pd
from verve.query.supplementaries import save, generate_id
from libra.query.supplementaries import save, generate_id
from keras.preprocessing.image import ImageDataGenerator
from sklearn.preprocessing import OneHotEncoder
from verve.plotting.generate_plots import (generate_regression_plots,
from libra.plotting.generate_plots import (generate_regression_plots,
generate_classification_plots)
from verve.preprocessing.data_preprocesser import initial_preprocesser
from verve.modeling.prediction_model_creation import get_keras_model_reg, get_keras_model_class
from libra.preprocessing.data_preprocesser import initial_preprocesser
from libra.modeling.prediction_model_creation import get_keras_model_reg, get_keras_model_class
from sklearn.preprocessing import StandardScaler
import numpy as np

Expand Down
Loading

0 comments on commit b44892b

Please sign in to comment.