ML मॉडलिंग स्टेप्स

Python में मार्केटिंग के लिए मशीन लर्निंग

Karolis Urbonas

Head of Analytics & Science, Amazon

Supervised learning स्टेप्स

  1. डेटा को training और testing में split करें
  2. मॉडल initialize करें
  3. training डेटा पर मॉडल fit करें
  4. testing डेटा पर वैल्यूज़ predict करें
  5. testing डेटा पर मॉडल का प्रदर्शन measure करें
Python में मार्केटिंग के लिए मशीन लर्निंग

Supervised learning with code

पहले लाइब्रेरीज़ लोड करें.

from sklearn import tree
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
Python में मार्केटिंग के लिए मशीन लर्निंग

Supervised learning स्टेप्स with code

# 1. Split data to training and testing
train_X, test_X, train_Y, test_Y = train_test_split(X, Y, test_size=0.25)

# 2. Initialize the model mytree = tree.DecisionTreeClassifier()
# 3. Fit the model on the training data treemodel = mytree.fit(train_X, train_Y)
# 4. Predict values on the testing data pred_Y = treemodel.predict(test_X)
# 5. Measure model performance on testing data accuracy_score(test_Y, pred_Y)
Python में मार्केटिंग के लिए मशीन लर्निंग

Unsupervised learning स्टेप्स

  1. मॉडल initialize करें
  2. मॉडल fit करें
  3. क्लस्टर वैल्यूज़ assign करें
  4. परिणाम explore करें
Python में मार्केटिंग के लिए मशीन लर्निंग

Unsupervised learning with code

पहले लाइब्रेरीज़ लोड करें.

from sklearn.cluster import KMeans
import pandas as pd
Python में मार्केटिंग के लिए मशीन लर्निंग

Unsupervised learning with code

1. Initialize the model
kmeans = KMeans(n_clusters=3)

# Fit the model kmeans.fit(data)
# 3. Asign cluster values data.assign(Cluster=kmeans.labels_)
# 4. Explore results data.groupby('Cluster').mean()
Python में मार्केटिंग के लिए मशीन लर्निंग

चलिए कुछ मॉडल बनाते हैं!

Python में मार्केटिंग के लिए मशीन लर्निंग

Preparing Video For Download...