trohith89 commited on
Commit
4bf156c
·
verified ·
1 Parent(s): 23b36b4

Update pages/1_Data_Card_and_Data_collection.py

Browse files
pages/1_Data_Card_and_Data_collection.py CHANGED
@@ -51,23 +51,44 @@ if df is not None:
51
  st.subheader("Dataset Shape (Rows, Columns):")
52
  st.write(df.shape)
53
 
54
- st.markdown('''
55
- # About the Dataset
56
- ## Description:
57
- This dataset provides insights into consumer electronics sales, featuring product categories, brands, prices, customer demographics, purchase behavior, and satisfaction metrics. It aims to analyze factors influencing purchase intent and customer satisfaction in the consumer electronics market.
58
- ## Features:
59
- - **ProductID**: Unique identifier for each product.
60
- - **ProductCategory**: Category of the consumer electronics product (e.g., Smartphones, Laptops).
61
- - **ProductBrand**: Brand of the product (e.g., Apple, Samsung).
62
- - **ProductPrice**: Price of the product ($).
63
- - **CustomerAge**: Age of the customer.
64
- - **CustomerGender**: Gender of the customer (0 - Male, 1 - Female).
65
- - **PurchaseFrequency**: Average number of purchases per year.
66
- - **CustomerSatisfaction**: Customer satisfaction rating (1 - 5).
67
- - **PurchaseIntent** (Target Variable): Intent to purchase.
68
- ## Conclusion:
69
- This dataset facilitates analysis on consumer behavior and purchase patterns in the consumer electronics sector, providing valuable insights into market dynamics and customer preferences.
70
- ''')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
 
72
  else:
73
  st.info("No dataset found. Please upload a CSV file.")
 
51
  st.subheader("Dataset Shape (Rows, Columns):")
52
  st.write(df.shape)
53
 
54
+ st.markdown('''**Dataset :**
55
+
56
+ | **Feature** | **Description** | **Example** |
57
+ |-------------------------|--------------------------------------------------------------------|------------------------------|
58
+ | **ProductID** | Unique identifier for each product. | 12345 |
59
+ | **ProductCategory** | Category of the consumer electronics product. | Smartphones, Laptops |
60
+ | **ProductBrand** | Brand of the product. | Apple, Samsung |
61
+ | **ProductPrice** | Price of the product (in dollars). | 999.99 |
62
+ | **CustomerAge** | Age of the customer. | 35 |
63
+ | **CustomerGender** | Gender of the customer (0 - Male, 1 - Female). | 1 |
64
+ | **PurchaseFrequency** | Average number of purchases per year. | 3 |
65
+ | **CustomerSatisfaction** | Customer satisfaction rating (1 - 5). | 4 |
66
+ | **PurchaseIntent** | Target variable: Intent to purchase (classification target). | 0 (No), 1 (Yes) |
67
+ ''')
68
+
69
+ st.markdown("### Import Necessary Libraries:")
70
+ st.code("""
71
+ import numpy as np
72
+ import pandas as pd
73
+ import matplotlib.pyplot as plt
74
+ import seaborn as sns
75
+ import plotly.express as px
76
+ import warnings
77
+ warnings.filterwarnings('ignore')
78
+
79
+ from sklearn.linear_model import LogisticRegression
80
+ from sklearn.neighbors import KNeighborsClassifier
81
+ from sklearn.model_selection import train_test_split, cross_val_score
82
+ from sklearn.preprocessing import StandardScaler, LabelEncoder
83
+ from sklearn.metrics import accuracy_score, classification_report, confusion_matrix, log_loss
84
+
85
+ import optuna
86
+ import imblearn
87
+ from imblearn.under_sampling import RandomUnderSampler
88
+ from imblearn.over_sampling import RandomOverSampler, SMOTE
89
+
90
+ import pickle
91
+ """, language="python")
92
 
93
  else:
94
  st.info("No dataset found. Please upload a CSV file.")