This package is used to perform the visualize parts of the titanic kaggle contest. Namely -
- To print the EDA plots (histograms, barplots) to see how many null values we are dealing with, skewness in the data and other interesting patterns.
- To visualize the feature importance from the results
Note: The best way to visualise the plots is to use the brane-ide. Please download it by following the steps from readme.
Follow this link to download all the dependcies and run the brane instance. (need to have both cli and instance installed and the instance running) and then follow from #6 below.
Or
Follow these instructions -
(Assuming you have docker, buildx plugin for docker, docker compose)
-
Download brane repository -
git clone https://github.com/epi-project/brane.git && cd brane
-
do -
chmod +x ./make.sh
-
Download cli for linux -
sudo wget -O /usr/local/bin/brane https://github.com/epi-project/brane/releases/latest/download/brane-linux
-
(alternate for #3) For macOS -
sudo wget -O /usr/local/bin/brane https://github.com/epi-project/brane/releases/latest/download/brane-darwin
-
Start instance -
./make.sh start-instance --precompiled
-
Running the ide (from the brane ide folder) -
make start-ide
-
Run the following to build the package -
brane build ./container.yml
-
Push the package to run it remotely in your instance (do
brane login http://127.0.0.1 --user <username>
first) -brane push brane_visualize
-
Use branescript (import this package in it by adding
import brane_visualize;
on the top) or dobrane repl --remote http://127.0.0.1:50053
(If you running on a K8 cluster, use the cluster address instead)
Or
You can read the next section to import the package directly from this github repository.
Assuming that you have brane cli and brane instance downloaded and deployed on your local/K8 cluster, then you can run the following command -> brane import web-services-and-cloud-based-systems/brane-visualise-package
This will import the package on your container registry hosted on your local/K8 cluster. Then you can use this package in your branescripts or on the repl.
Brane function | Description | Input | Output | Result |
---|---|---|---|---|
create_img |
Function to store the visualisation (histogram and barplots) graphs in the persistent folder /data | - | Returns string - "created"/"error" | /data/img folder created |
visualize_EDA |
Creates visualisation graphs for null values, data skewness, feature correlation | path of the file | Returns string - 0 (success)/ non-zero (error | graphs in /data/img folder |
visualize_results |
Creates visualisation graphs for final results | name, mode | Integer - 0 (success)/error code | Preprocesses dataset for models |
We have set automated build for this package using github actions and also run tests (pytest) on it. The triggers are push
and pull_request
, but, one can run it manually as well. Please refer to the image below to see how. (Click on run workflow(CI))
Assuming that you are in the root of the repository and downloaded the depencies (in the requirements.txt file), run pytest -v
.