{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Installation" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# run this cell to install pycaret in Google Colab\n", "# !pip install pycaret" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# If you are using Jupyter notebook, you can pip install pycaret using jupyter notebook or command line\n", "# pip install pycaret" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "1.0.0\n" ] } ], "source": [ "from pycaret.utils import version\n", "version()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# only run this cell if you are using google colab\n", "# from pycaret.utils import enable_colab\n", "# enable_colab()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# 1. Importing Dataset" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | country | \n", "en | \n", "gender | \n", "loan_amount | \n", "nonpayment | \n", "sector | \n", "status | \n", "
---|---|---|---|---|---|---|---|
0 | \n", "Dominican Republic | \n", "\"Banco Esperanza\" is a group of 10 women looki... | \n", "F | \n", "1225 | \n", "partner | \n", "Retail | \n", "0 | \n", "
1 | \n", "Dominican Republic | \n", "\"Caminemos Hacia Adelante\" or \"Walking Forward... | \n", "F | \n", "1975 | \n", "lender | \n", "Clothing | \n", "0 | \n", "
2 | \n", "Dominican Republic | \n", "\"Creciendo Por La Union\" is a group of 10 peop... | \n", "F | \n", "2175 | \n", "partner | \n", "Clothing | \n", "0 | \n", "
3 | \n", "Dominican Republic | \n", "\"Cristo Vive\" (\"Christ lives\" is a group of 10... | \n", "F | \n", "1425 | \n", "partner | \n", "Clothing | \n", "0 | \n", "
4 | \n", "Dominican Republic | \n", "\"Cristo Vive\" is a large group of 35 people, 2... | \n", "F | \n", "4025 | \n", "partner | \n", "Food | \n", "0 | \n", "
\\r\\n\\r\\nEduviges is the group representative and leader of the group. Eduviges has a lot on the line because she has 6 children that she has to take care of. She told me that those children are the reason she wants to be successful. She wants to be able to provide a different life for them and show them that they can be successful as well.
\\r\\n\\r\\nEduviges has a very small business selling shoes and Avon products. She plans to expand using this loan and dreams of success. The whole group is ready for this new challenge and are on the road to bettering their lives. On behalf of Eduviges, the group, and Esperanza International--------- Thank you for your support!!!!'" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "data.en[0]" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "data = data.head(1000)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# 2. Setting up Environment" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
Description | Value |
---|---|
session_id | \n", "786 | \n", "
# Documents | \n", "1000 | \n", "
Vocab Size | \n", "3870 | \n", "
Custom Stopwords | \n", "False | \n", "
\n", " | country | \n", "en | \n", "gender | \n", "loan_amount | \n", "nonpayment | \n", "sector | \n", "status | \n", "Topic_0 | \n", "Topic_1 | \n", "Topic_2 | \n", "Topic_3 | \n", "Dominant_Topic | \n", "Perc_Dominant_Topic | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "Dominican Republic | \n", "group woman look receive small loan take small... | \n", "F | \n", "1225 | \n", "partner | \n", "Retail | \n", "0 | \n", "0.255102 | \n", "0.114688 | \n", "0.627853 | \n", "0.002357 | \n", "Topic 2 | \n", "0.63 | \n", "
1 | \n", "Dominican Republic | \n", "walk forward group entrepreneur seek second lo... | \n", "F | \n", "1975 | \n", "lender | \n", "Clothing | \n", "0 | \n", "0.570880 | \n", "0.332298 | \n", "0.094765 | \n", "0.002057 | \n", "Topic 0 | \n", "0.57 | \n", "
2 | \n", "Dominican Republic | \n", "group people hope start business group look re... | \n", "F | \n", "2175 | \n", "partner | \n", "Clothing | \n", "0 | \n", "0.165148 | \n", "0.044879 | \n", "0.786944 | \n", "0.003029 | \n", "Topic 2 | \n", "0.79 | \n", "
3 | \n", "Dominican Republic | \n", "live group woman look receive first loan young... | \n", "F | \n", "1425 | \n", "partner | \n", "Clothing | \n", "0 | \n", "0.324298 | \n", "0.075029 | \n", "0.598386 | \n", "0.002287 | \n", "Topic 2 | \n", "0.60 | \n", "
4 | \n", "Dominican Republic | \n", "vive large group people hope take loan many se... | \n", "F | \n", "4025 | \n", "partner | \n", "Food | \n", "0 | \n", "0.212560 | \n", "0.152464 | \n", "0.632607 | \n", "0.002369 | \n", "Topic 2 | \n", "0.63 | \n", "