{"id":25811315,"url":"https://github.com/quantum-software-development/integrated_project-business","last_synced_at":"2025-02-28T00:38:35.835Z","repository":{"id":279232958,"uuid":"938139555","full_name":"Quantum-Software-Development/Integrated_Project-Business","owner":"Quantum-Software-Development","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-24T14:39:31.000Z","size":360,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T14:40:34.970Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Quantum-Software-Development.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"Quantum-Software-Developmen","Custom":"https://github.com/sponsors/Quantum-Software-Development/card"}},"created_at":"2025-02-24T13:38:46.000Z","updated_at":"2025-02-24T14:39:45.000Z","dependencies_parsed_at":"2025-02-24T14:40:37.083Z","dependency_job_id":"e499cb1d-a488-444a-b7bd-2f16cd3801cf","html_url":"https://github.com/Quantum-Software-Development/Integrated_Project-Business","commit_stats":null,"previous_names":["quantum-software-development/integrated_project-business"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quantum-Software-Development%2FIntegrated_Project-Business","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quantum-Software-Development%2FIntegrated_Project-Business/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quantum-Software-Development%2FIntegrated_Project-Business/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quantum-Software-Development%2FIntegrated_Project-Business/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Quantum-Software-Development","download_url":"https://codeload.github.com/Quantum-Software-Development/Integrated_Project-Business/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241079549,"owners_count":19906076,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-28T00:38:35.079Z","updated_at":"2025-02-28T00:38:35.822Z","avatar_url":"https://github.com/Quantum-Software-Development.png","language":null,"readme":"\u003cbr\u003e\n\n# \u003cp align=\"center\"\u003e Integrated Project for [Business]()\n\n\u003cbr\u003e\u003cbr\u003e\n\n\u003ch3 align=\"center\"\u003e  $$\\Huge {\\textbf{\\color{DodgerBlue} GOOD DECISIONS = GOOD RESULTS}}$$ \n\n\u003cbr\u003e\u003cbr\u003e\n\n### \u003cp align=\"center\"\u003e [![Sponsor Quantum Software Development](https://img.shields.io/badge/Sponsor-Quantum%20Software%20Development-brightgreen?logo=GitHub)](https://github.com/sponsors/Quantum-Software-Development)\n\n\u003cbr\u003e\n\n## [Standardization of a Range of Values]()\n\nt describes the process of scaling or normalizing data within a specific range, typically to a standardized scale, for example, from 0 to 1. This is a common technique in data analysis and machine learning.\n\n\u003cbr\u003e\n\n###  \u003cp align=\"center\"\u003e [Mathematical Formula]()\n\n\u003cbr\u003e\n\n$$X_{normalized} = \\frac{X - X_{\\min}}{X_{\\max} - X_{\\min}}$$\n\n\u003cbr\u003e\n\n### \u003cp align=\"center\"\u003e [Where]():\n\n $$X_{\\max} - X_{\\min} = \\text{Amplitude}$$ \n\n \u003cbr\u003e\n\n####  \u003cp align=\"center\"\u003e Is the `amplitude`, a way to represent the range of data values before normalization.\n\n\u003cbr\u003e\n\n## [Explanation]():\n\nTo calculate the standardization of the variables salario, n_filhos, and idade using both the Z-Score and Range methods, and to evaluate the mean, standard deviation, maximum, and minimum before and after standardization, we can follow these steps:\n\n\n### [Before Standardization]():\n\nCompute the mean, standard deviation, maximum, and minimum for each of the variables (n_filhos, salario, idade).\n\n#### [Z-Score Standardization]():\n\nWe standardize the variables using the Z-Score method, which is computed as:\n\n\n$Z$ = $\\frac{X - \\mu}{\\sigma}$\n\n```latex\nZ = \\frac{X - \\mu}{\\sigma}\n```\n\nWhere:\n- $\\( \\mu \\)$ is the mean,\n- $\\( \\sigma \\)$ is the standard deviation.\n\n  \u003cbr\u003e\n\n#### [Range Standardization (Min-Max Scaling)]():\n\nWe scale the data using the Min-Max method, which scales the values to a [0, 1] range using:\n\n$X'$ = $\\frac{X - \\min(X)}{\\max(X) - \\min(X)}$\n\n```latex\nX' = \\frac{X - \\min(X)}{\\max(X) - \\min(X)}\n```\n  \nWhere:\n- X is the original value,\n- min(X) is the minimum value,\n- max(X) is the maximum value.\n\n\u003cbr\u003e\n\n### [After Standardization]():\n\nCompute the mean, standard deviation, maximum, and minimum of the standardized data for both Z-Score and Range methods.\n\nThe output will provide the descriptive statistics before and after each standardization method, allowing you to compare the effects of Z-Score and Range standardization on the dataset.\n\n \u003cbr\u003e\n\n## Practical Example for Calculating this Normalized Value in [Python]():\n\n#### Use this [dataset](https://github.com/Quantum-Software-Development/Integrated_Project-Business/blob/f2d7abe6ee5853ae29c750170a01e429334f6fe5/HomeWork/1-Z-Score-Range/cadastro_funcionarios.xlsx)\n\nThe code demonstrates how to apply Z-Score and Range (Min-Max) standardization to the variables salario, n_filhos, and idade in a dataset. It also evaluates and compares the mean, standard deviation, minimum, and maximum values before and after the standardization methods are applied.\n\n \u003cbr\u003e\n\n#### Cell 1: [Import necessary libraries]()\n\n```python\n# Importing the necessary libraries\nimport pandas as pd\nimport numpy as np\nfrom sklearn.preprocessing import MinMaxScaler\n```\n\n\u003cbr\u003e\n\n#### Cell 2: [Load the dataset from the Excel file]()\n\n```python\n# Load the data from the Excel file\n# df = pd.read_excel('use-your-own-dataset.xlsx') - optional\ndf = pd.read_excel('cadastro_funcionarios.xlsx')\ndf.head()  # Displaying the first few rows of the dataset to understand its structure\n```\n\n\u003cbr\u003e\n\n#### Cell 3: [Evaluate the statistics before standardization]()\n\n```python\n# Step 1: Evaluate the mean, std, max, and min before standardization\nbefore_std_stats = {\n    'mean_n_filhos': df['n_filhos'].mean(),\n    'std_n_filhos': df['n_filhos'].std(),\n    'min_n_filhos': df['n_filhos'].min(),\n    'max_n_filhos': df['n_filhos'].max(),\n    \n    'mean_salario': df['salario'].mean(),\n    'std_salario': df['salario'].std(),\n    'min_salario': df['salario'].min(),\n    'max_salario': df['salario'].max(),\n    \n    'mean_idade': df['idade'].mean(),\n    'std_idade': df['idade'].std(),\n    'min_idade': df['idade'].min(),\n    'max_idade': df['idade'].max(),\n}\n\n# Display the statistics before standardization\nbefore_std_stats\n```\n\n\u003cbr\u003e\n\nCell 4: [Apply Z-Score standardization]()\n\n```python\n# Step 2: Z-Score Standardization\ndf_zscore = df[['n_filhos', 'salario', 'idade']].apply(lambda x: (x - x.mean()) / x.std())\n\n# Display the standardized data\ndf_zscore.head()\n```\n\n\u003cbr\u003e\n\nCell 5: [Evaluate the statistics after Z-Score standardization]()\n\n```python\n# Step 3: Evaluate the mean, std, max, and min after Z-Score standardization\nafter_zscore_stats = {\n    'mean_n_filhos_zscore': df_zscore['n_filhos'].mean(),\n    'std_n_filhos_zscore': df_zscore['n_filhos'].std(),\n    'min_n_filhos_zscore': df_zscore['n_filhos'].min(),\n    'max_n_filhos_zscore': df_zscore['n_filhos'].max(),\n    \n    'mean_salario_zscore': df_zscore['salario'].mean(),\n    'std_salario_zscore': df_zscore['salario'].std(),\n    'min_salario_zscore': df_zscore['salario'].min(),\n    'max_salario_zscore': df_zscore['salario'].max(),\n    \n    'mean_idade_zscore': df_zscore['idade'].mean(),\n    'std_idade_zscore': df_zscore['idade'].std(),\n    'min_idade_zscore': df_zscore['idade'].min(),\n    'max_idade_zscore': df_zscore['idade'].max(),\n}\n\n# Display the statistics after Z-Score standardization\nafter_zscore_stats\n```\n\n\u003cbr\u003e\n\nCell 6: [Apply Range Standardization]() (Min-Max Scaling)\n\n```python\n# Step 4: Range Standardization (Min-Max Scaling)\nscaler = MinMaxScaler()\ndf_range = pd.DataFrame(scaler.fit_transform(df[['n_filhos', 'salario', 'idade']]), columns=['n_filhos', 'salario', 'idade'])\n\n# Display the scaled data\ndf_range.head()\n```\n\n\u003cbr\u003e\n\nCell 7: [Evaluate the statistics after Range standardization]()\n\n```python\n# Step 5: Evaluate the mean, std, max, and min after Range standardization\nafter_range_stats = {\n    'mean_n_filhos_range': df_range['n_filhos'].mean(),\n    'std_n_filhos_range': df_range['n_filhos'].std(),\n    'min_n_filhos_range': df_range['n_filhos'].min(),\n    'max_n_filhos_range': df_range['n_filhos'].max(),\n    \n    'mean_salario_range': df_range['salario'].mean(),\n    'std_salario_range': df_range['salario'].std(),\n    'min_salario_range': df_range['salario'].min(),\n    'max_salario_range': df_range['salario'].max(),\n    \n    'mean_idade_range': df_range['idade'].mean(),\n    'std_idade_range': df_range['idade'].std(),\n    'min_idade_range': df_range['idade'].min(),\n    'max_idade_range': df_range['idade'].max(),\n}\n\n# Display the statistics after Range standardization\nafter_range_stats\n```\n\n\u003cbr\u003e\n\n\n\n\n \u003cbr\u003e\n \n\n## Pratical Example for Calculating this Normalized Value in [Excel]() \n\n#### Use this [dataset](https://github.com/Quantum-Software-Development/Integrated_Project-Business/blob/f2d7abe6ee5853ae29c750170a01e429334f6fe5/HomeWork/1-Z-Score-Range/cadastro_funcionarios.xlsx)\n\nTo standardize the variables (salary, number of children, and age) in Excel using the Z-Score and Range methods, you can follow these steps:\n\n \u003cbr\u003e\n\n## I. [Z-Score Standardization]()\n\n### Steps for Z-Score in Excel:\n\n#### 1. [Find the Mean (µ)]():\n\nUse the AVERAGE function to calculate the mean of the column. For example, to find the mean of the salary (column E), use:\n\n```excel\n=AVERAGE(E2:E351)\n```\n\n\u003cbr\u003e\n\n#### 2. [Find the Standard Deviation (σ)]():\n   \nUse the STDEV.P function to calculate the standard deviation of the column. For example, to find the standard deviation of the salary (column E), use:\n\n```excel\n=STDEV.P(E2:E351)\n```\n\n\u003cbr\u003e\n\n#### 3. [Apply the Z-Score Formula]():\n\nFor each value in the column, apply the Z-Score formula. In the first row of the new column, use:\n\n```excel\n=(E2 - AVERAGE(E$2:E$351)) / STDEV.P(E$2:E$351)\n```\n\n\u003cbr\u003e\n\n#### 4.[Drag the formula down to calculate the Z-Score for all the rows]():\n\nExample for Salary:\n\nIn cell H2 (new column for standardized salary), write\n\n```excel\n=(E2 - AVERAGE(E$2:E$351)) / STDEV.P(E$2:E$351)\n```\n\nThen, drag it down to the rest of the rows.\n\nRepeat the same steps for the variables n_filhos (column D) and idade (column F).\n\n\n\u003cbr\u003e\n\n## II. [Range Standardization]()\n\nSteps for Range Standardization in Excel:\n\n#### 1. [Find the Min and Max]():\n\nUse the MIN and MAX functions to find the minimum and maximum values of the column. For example, to find the min and max of salary (column E), use:\n\n```excel\n=MIN(E2:E351)\n=MAX(E2:E351)\n```\n\n\u003cbr\u003e\n\n#### 2. [Apply the Range Formula]():\n\nFor each value in the column, apply the range formula. In the first row of the new column, use:\n\n```excel\n=(E2 - MIN(E$2:E$351)) / (MAX(E$2:E$351) - MIN(E$2:E$351))\n```\n\n\u003cbr\u003e\n\n#### 3.[Drag the formula down to calculate the range standardized values for all the rows]():\n\nExample for Salary:\n\nIn cell I2 (new column for range standardized salary), write:\n\n```excel\n=(E2 - MIN(E$2:E$351)) / (MAX(E$2:E$351) - MIN(E$2:E$351))\n```\n\nThen, drag it down to the rest of the rows.\nRepeat the same steps for the variables n_filhos (column D) and idade (column F).\n\n\u003cbr\u003e\n\n\n## Summary of the Process\n\n[Z-Score Standardization]() centers the data around [zero]() and scales it based on the [standard deviation]().\n\n[Range Standardization (Min-Max Scaling)]() rescals the data to a [[0, 1] range]().\n\nBoth techniques were applied (given dataset)  to the [columns n_filhos](), [salario](), and [idade](), and the statistics (mean, std, min, max) were calculated before and after the standardization methods.\n\n\n\n\u003cbr\u003e\u003cbr\u003e\n\n#\n\n###### \u003cp align=\"center\"\u003e Copyright 2025 Quantum Software Development. Code released under the [MIT License license.](https://github.com/Quantum-Software-Development/Math/blob/3bf8270ca09d3848f2bf22f9ac89368e52a2fb66/LICENSE)\n\n\n\n\n  \n\n\n","funding_links":["https://github.com/sponsors/Quantum-Software-Developmen","https://github.com/sponsors/Quantum-Software-Development/card","https://github.com/sponsors/Quantum-Software-Development"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantum-software-development%2Fintegrated_project-business","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquantum-software-development%2Fintegrated_project-business","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantum-software-development%2Fintegrated_project-business/lists"}