{"id":25580288,"url":"https://github.com/cihaneksi/salary_regression","last_synced_at":"2026-05-08T04:49:05.501Z","repository":{"id":278648935,"uuid":"936320896","full_name":"CihanEksi/salary_regression","owner":"CihanEksi","description":"In this project I trained a machine learning model to predict customer estimated salary based on various features. Solution method is Artificial Neural Network (ANN).","archived":false,"fork":false,"pushed_at":"2025-02-20T22:22:14.000Z","size":297,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-20T23:24:42.404Z","etag":null,"topics":["ai","ann","keras","prediction","python","regression","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CihanEksi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-02-20T22:20:27.000Z","updated_at":"2025-02-20T22:24:20.000Z","dependencies_parsed_at":"2025-02-20T23:25:04.011Z","dependency_job_id":"ad28c11a-94ca-4237-9c56-aee16b0e48a8","html_url":"https://github.com/CihanEksi/salary_regression","commit_stats":null,"previous_names":["cihaneksi/salary_regression"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CihanEksi%2Fsalary_regression","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CihanEksi%2Fsalary_regression/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CihanEksi%2Fsalary_regression/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CihanEksi%2Fsalary_regression/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CihanEksi","download_url":"https://codeload.github.com/CihanEksi/salary_regression/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239952637,"owners_count":19723924,"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":["ai","ann","keras","prediction","python","regression","tensorflow"],"created_at":"2025-02-21T04:15:22.714Z","updated_at":"2026-03-30T21:30:16.063Z","avatar_url":"https://github.com/CihanEksi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Salary Regression Model\n\nIn this project I trained a machine learning model to predict customer estimated salary based on various features.\nSolution method is Artificial Neural Network (ANN).\n\n## Requirements\n\n- Python 3.x\n- TensorFlow\n- pandas\n- pickle\n- scikit-learn\n\n## Files\n\n- `regression_model.keras`: Trained TensorFlow model\n- `label_encoder.pkl`: Pickle file for categorical encoding\n- `ordinal_encode.pkl`: Pickle file for ordinal encoding\n- `scaler.pkl`: Pickle file for feature scaling\n\n## Prediction Steps\n\n1. **Data Preprocessing**\n   - Load the model, encoders, and scaler\n   - Convert input data to pandas DataFrame\n   - Apply categorical encoding for the Gender field\n   - Apply ordinal encoding for the Geography field\n   - Scale the features using the scaler\n\n2. **Model Prediction**\n   - Feed the preprocessed data into the model\n   - Get the prediction output\n   - Return the prediction as a JSON response\n\n## Input Features\n\n- `CreditScore`: Customer's credit score (numeric)\n- `Geography`: Customer's location (France, Spain, Germany)\n- `Gender`: Customer's gender (Male, Female)\n- `Age`: Customer's age (numeric)\n- `Tenure`: Number of years as a customer (numeric)\n- `Balance`: Account balance (numeric)\n- `NumOfProducts`: Number of bank products used (numeric)\n- `HasCrCard`: Has credit card (1 = Yes, 0 = No)\n- `IsActiveMember`: Active member status (1 = Yes, 0 = No)\n- `Exited`: Customer churn status (1 = Yes, 0 = No)\n\n## What We Did?\n\n1. **Loading Resources**\n   - Loaded the trained model using `load_model`.\n   - Loaded the encoders and scaler from their respective pickle files.\n\n2. **Data Encoding**\n   - Defined functions for ordinal and categorical encoding.\n   - Encoded the input data using these functions.\n\n3. **Data Scaling**\n   - Scaled the encoded input data using the loaded scaler.\n\n4. **Prediction**\n   - Made predictions using the preprocessed and scaled data.\n   - Converted the prediction result to a JSON format for easy interpretation.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcihaneksi%2Fsalary_regression","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcihaneksi%2Fsalary_regression","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcihaneksi%2Fsalary_regression/lists"}