Skip to content

Commit 0c9b03e

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents c292a12 + 99701d0 commit 0c9b03e

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

Data maker.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,29 @@
11
import pandas as pd
22
import numpy as np
33
import random
4-
54
# Settings
65
num_rows = 1000 # Factory workers
76
num_columns = 12 # Data columns
8-
97
# Base columns (will be reused in patterns)
108
worker_ids = [f"W{1000 + i}" for i in range(num_rows)]
119
ages = np.random.randint(20, 60, size=num_rows)
1210
experience_years = [random.randint(0, age - 20) for age in ages]
1311
departments = np.random.choice(['Assembly', 'Maintenance', 'Packaging', 'QC', 'Logistics'], size=num_rows)
14-
1512
# Start the dataframe
1613
df = pd.DataFrame({
1714
'WorkerID': worker_ids,
1815
'Age': ages,
1916
'Experience': experience_years,
2017
'Department': departments
2118
})
22-
2319
# Generate 9996 additional columns with related sensor/factory data
2420
for i in range(1, num_columns - 4): # -3 because we already added 4 columns above
2521
col_name = f"Sensor_{i}"
2622
# Example logic: related to experience and age, with noise
2723
df[col_name] = df['Experience'] * np.random.uniform(0.5, 1.5) + np.random.normal(0, 5, size=num_rows)
28-
2924
# Insert NaNs randomly for data cleaning practice
3025
mask = np.random.rand(num_rows) < 0.05 # ~5% missing
3126
df.loc[mask, col_name] = np.nan
32-
3327
# Save to CSV
3428
df.to_csv("factory_worker_data.csv", index=False)
35-
3629
print("CSV with 10,000+ columns and realistic values generated successfully.")

Encoding.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
{
2525
"metadata": {},
2626
"cell_type": "markdown",
27-
"source": "# ONE ENCODER(Nominal)",
27+
"source": "# ONE ENCODER",
2828
"id": "fa40e0a6e557a93a"
2929
},
3030
{

0 commit comments

Comments
 (0)