|
Matnni qayta ishlashni avtomatlashtirish
|
bet | 70/182 | Sana | 19.05.2024 | Hajmi | 5,69 Mb. | | #244351 |
Bog'liq Python sun\'iy intellekt texnologiyasi Dasrlik 2024Matnni qayta ishlashni avtomatlashtirish:
Tabiiy tilni qayta ishlash (NLP) mijozlarning fikr-mulohazalarini tahlil qilish va mahsulot va xizmatlarni yaxshilash uchun asosiy mavzularni ta’kidlash uchun ishlatilishi mumkin.
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.naive_bayes import MultinomialNB
# Sharhlarni yuklash
reviews = pd.read_csv('sharhlar_klientlar.csv')
# Matnni raqamli belgilarga aylantirish
vectorizer = CountVectorizer()
X = vectorizer.fit_transform(reviews['matn_tivasi'])
# Tonallikni tahlil qilish uchun modelni o‘rgatish
sentiment_model = MultinomialNB()
sentiment_model.fit(X, reviews[' tonallik '])
Mijozlarning chiqib ketishini bashorat qilish:
Mashinali o‘qitish modellari mijozlarning chiqib ketishini bashorat qilish va ularni ushlab turish choralarini ko‘rish uchun ishlatilishi mumkin.
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import accuracy_score, confusion_matrix
# Ma’lumotlarni yuklash
customer_data = pd.read_csv('ma’lumotlar_o_klientlar.csv')
# Ma’lumotlarni tayyorlash
X = customer_data.drop("chiqish", axis =1)
y = customer_data['отток']
# Ma’lumotlarni ajratish
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
# Modelni o‘qitish
churn_model = RandomForestClassifier()
churn_model.fit(X_train, y_train)
# Chiqib ketishni bashorat qilish
predictions = churn_model.predict(X_test)
# Aniqlikni baholash
accuracy = accuracy_score(y_test, predictions)
confusion = confusion_matrix(y_test, predictions)
Ushbu misollar inventarizatsiyani boshqarishdan tortib marketing samaradorligini oshirish va mijozlar oqimini boshqarishgacha bo‘lgan biznes jarayonlarining turli jihatlarini optimallashtirish uchun mashinali o‘qitish va ma’lumotlar tahlilidan qanday foydalanishni ko‘rsatadi.
|
| |