# --- Part 1.1: Project Structure ---
p11 = """# Project Structure (Create these files manually)

PRAC_1/
│── classification.csv
│── regression.csv
│── ml_lifecycle.py
│── requirements.txt
"""

# --- Part 1.2: requirements.txt ---
p12 = """joblib
scikit-learn
pandas
numpy
"""

# --- Part 1.3: ml_lifecycle.py ---
p13 = """import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression, LogisticRegression
from sklearn.metrics import accuracy_score, mean_squared_error
import joblib
from sklearn.datasets import make_regression


data = pd.read_csv("classification.csv")

X = data[['Age','Salary']]
y = data['Purchased']

X_train, X_test, y_train, y_test = train_test_split(X,y,test_size=0.3,random_state=42)

model = LogisticRegression()
model.fit(X_train,y_train)

pred = model.predict(X_test)
acc = accuracy_score(y_test,pred)
print("Accuracy: ",acc)

joblib.dump(model,"classification.pkl")
print("Classification Model Saved")


data = pd.read_csv("regression.csv")

X = data[['Experience','Hours']]
y = data['Salary']

X_train, X_test, y_train, y_test = train_test_split(X,y,test_size=0.3,random_state=54)

model = LinearRegression()
model.fit(X_train,y_train)

pred = model.predict(X_test)
mse = mean_squared_error(y_test,pred)
print("Mean Squared Error: ",mse)

joblib.dump(model,"regression.pkl")
print("Regression Model Saved")
"""