Spaces:
Sleeping
Sleeping
updated the README
Browse files
README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
---
|
2 |
title: SVM Regressor
|
3 |
-
emoji:
|
4 |
colorFrom: purple
|
5 |
colorTo: blue
|
6 |
sdk: streamlit
|
@@ -12,3 +12,84 @@ short_description: App demonstrating the SVM Regressor
|
|
12 |
---
|
13 |
|
14 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
title: SVM Regressor
|
3 |
+
emoji: π€
|
4 |
colorFrom: purple
|
5 |
colorTo: blue
|
6 |
sdk: streamlit
|
|
|
12 |
---
|
13 |
|
14 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
15 |
+
|
16 |
+
# SVM Regressor Demo π€
|
17 |
+
|
18 |
+
This app demonstrates the use of Support Vector Machines (SVM) for regression problems in various domains. It provides a user-friendly interface to select a problem, visualize the dataset, train an SVM Regressor, and interpret the results.
|
19 |
+
|
20 |
+
## Features
|
21 |
+
|
22 |
+
* **Problem Selection:** Choose from three example problems: Business πΌ, Engineering βοΈ, or Education π.
|
23 |
+
* **Dataset Display:** View the corresponding dataset for the selected problem, along with a description of its features.
|
24 |
+
* **Model Training and Performance:** Train an SVM Regressor on the selected dataset. Display the model's performance using metrics like R-squared and Mean Squared Error. Adjust hyperparameters to fine-tune the model. Visualize the regression results using a scatter plot with a regression line.
|
25 |
+
* **Output Interpretation:** Get a clear explanation of the model's output in the context of the selected problem. Understand the significance of the results and how they can be used for predictions or decisions.
|
26 |
+
|
27 |
+
## Learning Objectives
|
28 |
+
|
29 |
+
* Understand the concept of SVM Regression and its applications.
|
30 |
+
* Learn how to train and evaluate SVM Regressors using Python.
|
31 |
+
* Explore the impact of different hyperparameters on the model's performance.
|
32 |
+
* Interpret and explain the results of SVM Regression in various domains.
|
33 |
+
|
34 |
+
## Datasets
|
35 |
+
|
36 |
+
The app uses three synthetic datasets for demonstration purposes:
|
37 |
+
|
38 |
+
* **Business πΌ:**
|
39 |
+
* **Features:** `Usage` (in hours), `Demographics` (binary)
|
40 |
+
* **Target:** `Churn` (continuous)
|
41 |
+
* **Description:** Predicts customer churn based on usage patterns and demographics.
|
42 |
+
* **Engineering βοΈ:**
|
43 |
+
* **Features:** `Sensor_Data` (continuous)
|
44 |
+
* **Target:** `RUL` (Remaining Useful Life) (continuous)
|
45 |
+
* **Description:** Predicts the remaining useful life of an industrial machine based on sensor data.
|
46 |
+
* **Education π:**
|
47 |
+
* **Features:** `Study_Hours` (continuous), `Prev_Grades` (continuous)
|
48 |
+
* **Target:** `Test_Scores` (continuous)
|
49 |
+
* **Description:** Predicts student performance on a standardized test based on study habits and previous grades.
|
50 |
+
|
51 |
+
## How to Use
|
52 |
+
|
53 |
+
1. **Select a Problem:** Choose one of the three problems from the dropdown menu.
|
54 |
+
2. **View Dataset:** The corresponding dataset will be displayed, along with a description of its features.
|
55 |
+
3. **Train and Evaluate Model:** Adjust the hyperparameters (kernel, C, epsilon) using the sliders. The model will be trained on the dataset and its performance metrics will be displayed.
|
56 |
+
4. **Visualize Results:** The regression results will be visualized using a scatter plot with a regression line.
|
57 |
+
5. **Interpret Output:** Read the interpretation of the model's output in the context of the selected problem.
|
58 |
+
|
59 |
+
## Additional Features
|
60 |
+
|
61 |
+
* **Interactive Visualizations:** Explore the impact of different hyperparameters on the model's performance by adjusting the sliders and observing the changes in the regression results.
|
62 |
+
* **Upload Your Own Data:** Train an SVM Regressor on your own dataset by uploading a CSV file. (This feature is not yet implemented.)
|
63 |
+
|
64 |
+
## Requirements
|
65 |
+
|
66 |
+
* Python 3.7+
|
67 |
+
* Streamlit
|
68 |
+
* Pandas
|
69 |
+
* Scikit-learn
|
70 |
+
* Matplotlib
|
71 |
+
|
72 |
+
## Installation
|
73 |
+
|
74 |
+
1. Install Python 3.7+
|
75 |
+
2. Create a virtual environment (optional but recommended)
|
76 |
+
3. Activate the virtual environment
|
77 |
+
4. Install the required packages using pip: `pip install streamlit pandas scikit-learn matplotlib`
|
78 |
+
|
79 |
+
## Usage
|
80 |
+
|
81 |
+
1. Download the repository and unzip it.
|
82 |
+
2. Navigate to the repository directory.
|
83 |
+
3. Run the app using `streamlit run app.py`.
|
84 |
+
|
85 |
+
## Contributing
|
86 |
+
|
87 |
+
Contributions are welcome! If you find any bugs, have suggestions for improvements, or want to add new features, please feel free to submit a pull request.
|
88 |
+
|
89 |
+
## License
|
90 |
+
|
91 |
+
This project is licensed under the MIT License. See the LICENSE file for more details.
|
92 |
+
|
93 |
+
## Acknowledgements
|
94 |
+
|
95 |
+
This app is inspired by [https://medium.com/coinmonks/support-vector-regression-or-svr-8eb3acf6d0ff](https://medium.com/coinmonks/support-vector-regression-or-svr-8eb3acf6d0ff).
|