From 830881831b643742881a16d461cff61dce10274f Mon Sep 17 00:00:00 2001 From: Harshit Sethi Date: Thu, 10 Oct 2024 13:12:09 +0530 Subject: [PATCH 1/2] Explain working of model in readme --- readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index f2c2dc5..5b6acd1 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@ -Phone numbers in India are a set of unique 10 digit numbers. Out of which, first 4 are network operator/circle code. These prefixes range from 6xxx - 9xxx. Last six are random. This is a dataset of first four numbers with their respective state, operator name. +Phone numbers in India are a set of unique 10 digit numbers. Out of which, first 4 are network operator/circle code. These prefixes range from 6xxx - 9xxx. Last six are random. This is a dataset, charts, model of first four numbers with their respective state, operator name. -Note: Starting from commit hash `9de66f3f74e465c973f5e2a47241c7627ca94c32`, the dataset is refractored to contain only 3 columns: Series, Operator, Circle. This makes it easier to use/read and eliminates duplicate columns name. +Note: Starting from commit hash `9de66f3f74e465c973f5e2a47241c7627ca94c32`, the dataset is refractored to contain only 3 columns: series, operator, circle. This makes it easier to use/read and eliminates duplicate columns name. Note: This dataset is provided "as-is" without any warranty of any kind. While I have personally fixed many errors, I still can't guarantee that this dataset is accurate. Use at your own risk. @@ -9,7 +9,7 @@ Note: This dataset is provided "as-is" without any warranty of any kind. While I - Privacy friendly alternative to reverse phone number lookup services like Truecaller - +See the section below for pretrained models, training and inference script. - Model training @@ -17,7 +17,7 @@ Note: This dataset is provided "as-is" without any warranty of any kind. While I ## Using Machine Learning To Predict Operator Names -A Python script named, `predict-operator.py` is provided with this project. It works by checking if the operator to predict is in dataset. If not, it will try using the appropriate model for predicting the operator. If appropriate model is not found, it will trathe model using KNN and save the resulting model, which can be used to predict. +A Python script named, `predict-operator.py` is provided with this project. It works by checking if the operator to predict is in dataset. If not, it will try using the appropriate model for predicting the operator. There are 4 specialized KNN models trained on 4 different set of prefixes using KNN. If appropriate model is not found, it will train model and save the resulting model using Joblib. To run it simply run: `python predict-operator.py`. From a983db9e9426eaa9182ed495e2d4c3a894f7a074 Mon Sep 17 00:00:00 2001 From: Harshit Sethi Date: Thu, 10 Oct 2024 17:25:01 +0530 Subject: [PATCH 2/2] Create pylint.yml --- .github/workflows/pylint.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/pylint.yml diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 0000000..c73e032 --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,23 @@ +name: Pylint + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10"] + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pylint + - name: Analysing the code with pylint + run: | + pylint $(git ls-files '*.py')