{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "2c124ef2", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np\n", "import seaborn as sns\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "code", "execution_count": 2, "id": "5249e11d", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| \n", " | act | \n", "year | \n", "chapter | \n", "section_no | \n", "title | \n", "body | \n", "legal_topic | \n", "procedural_stage | \n", "actors | \n", "keywords | \n", "bail_related | \n", "investigation_related | \n", "court_related | \n", "rights_related | \n", "chapter_no | \n", "
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | \n", "BNSS | \n", "2023 | \n", "PRELIMINARY | \n", "1 | \n", "Short title, extent and commencement | \n", "(1) This Act may be called the Bharatiya Nagar... | \n", "Legislation | \n", "Enactment | \n", "[Central Government] | \n", "[Act, Bharatiya Nagarik Suraksha Sanhita] | \n", "False | \n", "False | \n", "False | \n", "False | \n", "CHAPTER I | \n", "
| 1 | \n", "BNSS | \n", "2023 | \n", "PRELIMINARY | \n", "2 | \n", "Definitions | \n", "(1) In this Sanhita, unless the context otherw... | \n", "Definitions | \n", "Preliminary | \n", "[State Government, Magistrate, Police Officer] | \n", "[definition, offence, bail, cognizable] | \n", "True | \n", "True | \n", "False | \n", "True | \n", "CHAPTER I | \n", "
| 2 | \n", "BNSS | \n", "2023 | \n", "PRELIMINARY | \n", "3 | \n", "Construction of references | \n", "(1) Unless the context otherwise requires, any... | \n", "Jurisdiction | \n", "Preliminary | \n", "[Magistrate, Judicial Magistrate, Executive Ma... | \n", "[reference, magistrate, judicial magistrate, e... | \n", "False | \n", "True | \n", "False | \n", "False | \n", "CHAPTER I | \n", "
| 3 | \n", "BNSS | \n", "2023 | \n", "PRELIMINARY | \n", "4 | \n", "Trial of offences under Bharatiya Nyaya Sanhit... | \n", "(1) All offences under \\nthe Bharatiya Nyaya S... | \n", "Trial of Offences | \n", "Trial | \n", "[Court] | \n", "[trial, offences, Bharatiya Nyaya Sanhita] | \n", "False | \n", "False | \n", "True | \n", "False | \n", "CHAPTER I | \n", "
| 4 | \n", "BNSS | \n", "2023 | \n", "PRELIMINARY | \n", "5 | \n", "Saving | \n", "Nothing contained in this Sanhita shall, in th... | \n", "Special Laws | \n", "Preliminary | \n", "[Legislature] | \n", "[special law, local law, jurisdiction] | \n", "False | \n", "False | \n", "True | \n", "False | \n", "CHAPTER I | \n", "
| \n", " | year | \n", "section_no | \n", "
|---|---|---|
| count | \n", "531.0 | \n", "531.000000 | \n", "
| mean | \n", "2023.0 | \n", "266.000000 | \n", "
| std | \n", "0.0 | \n", "153.430766 | \n", "
| min | \n", "2023.0 | \n", "1.000000 | \n", "
| 25% | \n", "2023.0 | \n", "133.500000 | \n", "
| 50% | \n", "2023.0 | \n", "266.000000 | \n", "
| 75% | \n", "2023.0 | \n", "398.500000 | \n", "
| max | \n", "2023.0 | \n", "531.000000 | \n", "
| \n", " | act | \n", "year | \n", "chapter | \n", "section_no | \n", "title | \n", "body | \n", "legal_topic | \n", "procedural_stage | \n", "actors | \n", "keywords | \n", "bail_related | \n", "investigation_related | \n", "court_related | \n", "rights_related | \n", "chapter_no | \n", "
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | \n", "BNSS | \n", "2023 | \n", "PRELIMINARY | \n", "1 | \n", "Short title, extent and commencement | \n", "(1) This Act may be called the Bharatiya Nagar... | \n", "Legislation | \n", "Enactment | \n", "Central Government | \n", "Act Bharatiya Nagarik Suraksha Sanhita | \n", "0 | \n", "No | \n", "No | \n", "No | \n", "CHAPTER I | \n", "
| 1 | \n", "BNSS | \n", "2023 | \n", "PRELIMINARY | \n", "2 | \n", "Definitions | \n", "(1) In this Sanhita, unless the context otherw... | \n", "Definitions | \n", "Preliminary | \n", "State Government Magistrate Police Officer | \n", "definition offence bail cognizable | \n", "1 | \n", "Yes | \n", "No | \n", "Yes | \n", "CHAPTER I | \n", "
| 2 | \n", "BNSS | \n", "2023 | \n", "PRELIMINARY | \n", "3 | \n", "Construction of references | \n", "(1) Unless the context otherwise requires, any... | \n", "Jurisdiction | \n", "Preliminary | \n", "Magistrate Judicial Magistrate Executive Magis... | \n", "reference magistrate judicial magistrate execu... | \n", "0 | \n", "Yes | \n", "No | \n", "No | \n", "CHAPTER I | \n", "
| 3 | \n", "BNSS | \n", "2023 | \n", "PRELIMINARY | \n", "4 | \n", "Trial of offences under Bharatiya Nyaya Sanhit... | \n", "(1) All offences under \\nthe Bharatiya Nyaya S... | \n", "Trial of Offences | \n", "Trial | \n", "Court | \n", "trial offences Bharatiya Nyaya Sanhita | \n", "0 | \n", "No | \n", "Yes | \n", "No | \n", "CHAPTER I | \n", "
| 4 | \n", "BNSS | \n", "2023 | \n", "PRELIMINARY | \n", "5 | \n", "Saving | \n", "Nothing contained in this Sanhita shall, in th... | \n", "Special Laws | \n", "Preliminary | \n", "Legislature | \n", "special law local law jurisdiction | \n", "0 | \n", "No | \n", "Yes | \n", "No | \n", "CHAPTER I | \n", "
| \n", " | text | \n", "
|---|---|
| 0 | \n", "2023 PRELIMINARY 1 Short title, extent and com... | \n", "
| 1 | \n", "2023 PRELIMINARY 2 Definitions (1) In this San... | \n", "
| 2 | \n", "2023 PRELIMINARY 3 Construction of references ... | \n", "
| 3 | \n", "2023 PRELIMINARY 4 Trial of offences under Bha... | \n", "
| 4 | \n", "2023 PRELIMINARY 5 Saving Nothing contained in... | \n", "
| \n", " | text | \n", "
|---|---|
| 0 | \n", "2023 preliminary 1 short title extent and comm... | \n", "
| 1 | \n", "2023 preliminary 2 definitions 1 in this sanhi... | \n", "
| 2 | \n", "2023 preliminary 3 construction of references ... | \n", "
| 3 | \n", "2023 preliminary 4 trial of offences under bha... | \n", "
| 4 | \n", "2023 preliminary 5 saving nothing contained in... | \n", "
| \n", " | Name | \n", "accuracy_score | \n", "
|---|---|---|
| 0 | \n", "Decision Tree_C | \n", "0.831776 | \n", "
| 1 | \n", "Random Forest_C | \n", "0.878505 | \n", "
| 2 | \n", "Extra Trees_C | \n", "0.878505 | \n", "
| 3 | \n", "Gradient Boosting_C | \n", "0.878505 | \n", "
| 4 | \n", "K-Neighbors_C | \n", "0.850467 | \n", "
| 5 | \n", "XGBoost_C | \n", "0.878505 | \n", "
| 6 | \n", "AdaBoost_C | \n", "0.887850 | \n", "