Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 5

Library SKlearn

A. Data Preparation 8. Decision Tree


1. Data files from SKlearn 9. Ensemble Regression
2. Data cleaning 10. Ensemble Classifier
3. Metrics module 11. K Nearest Neighbors
4. Feature selection 12. Naïve Bayes
5. Data Scaling 13. LDA , QDA
6. Data Split 14. Hierarchical Clusters
15. DbScan
B. ML Algorithms 16. NLP
1. Linear Regression
2. Logistic Regression C. Algorithm Evaluation :
3. Neural Network 1. Model Check
4. SVR 2. Grid Search
5. SVC 3. Pipeline
6. K-means 4. Model Save
7. PCA

1
‫‪Sklearn‬‬
‫من أهم المكتبات المستخدمة في ‪ML , Data science , Data Mining :‬‬ ‫‪‬‬
‫اختصار لكلمات ‪Scikit Learn‬‬ ‫‪‬‬
‫اإلصدار األول ‪2007 :‬‬ ‫‪‬‬
‫اإلصدار الواحد والعشرون ‪2019 :‬‬ ‫‪‬‬
‫مملوكة لجوجل‬ ‫‪‬‬
‫تستخدم مع ‪C , C++ , Python‬‬ ‫‪‬‬
‫موجودة في باقة أناكوندا ‪ ,‬وعلي الكرينيل الخاص بكاجل‬ ‫‪‬‬
‫تحتوي علي كم هائل من الخوارزميات الخاصة بالـ ‪ ML‬و سهلة في التعامل‬ ‫‪‬‬
‫يتم التأكد من اإلصدار عبر الكود ‪:‬‬ ‫‪‬‬
‫‪import sklearn‬‬
‫) __‪print( sklearn.__version‬‬

‫‪2‬‬
‫‪ :‬مصطلحات هامة‬
‫‪‬‬ ‫‪Library‬‬ ‫‪:‬‬ ‫مكتبة سياكيتليرن كلها‬
‫‪‬‬ ‫‪Module‬‬ ‫‪:‬‬ ‫الفروع‬
‫‪‬‬ ‫‪Class‬‬ ‫‪:‬‬ ‫االلجوريثم المستخدم‬
‫‪‬‬ ‫‪Object‬‬ ‫‪:‬‬ ‫الكائن المستنسخ من الكالس لعمل التدريب و التوقع‬
‫‪‬‬ ‫‪Parameters‬‬ ‫‪:‬‬ ‫البيانات المطلوبة في االلجوريثم‬
‫‪‬‬ ‫‪Attributes‬‬ ‫‪:‬‬ ‫المعلومات الخارجة من االلجوريثم‬
‫‪‬‬ ‫‪Methods‬‬ ‫‪:‬‬ ‫الدوال الموجودة في األلجوريثم‬

‫‪3‬‬
# Import Libraries
from sklearn.linear_model import LinearRegression

#----------------------------------------------------
#Applying Linear Regression Model

LR = LinearRegression(fit_intercept=True, normalize=True,copy_X=True,n_jobs=-1)
LR.fit(X_train, y_train)

#Calculating Details
#print('Linear Regression Train Score is : ' , LR.score(X_train, y_train))
#print('Linear Regression Test Score is : ' , LR.score(X_test, y_test))
#print('Linear Regression Coef is : ' , LR.coef_)
#print('Linear Regression intercept is : ' , LR.intercept_)
#print('----------------------------------------------------')

#Calculating Prediction
y_pred = LR.predict(X_test)
#print('Predicted Value for Linear Regression is : ' , y_pred[:10])

4
from sklearn.linear_model import LinearRegression Library

from sklearn.linear_model import LinearRegression Module

from sklearn.linear_model import LinearRegression Class

LR = LinearRegression(fit_intercept=True, normalize=True) Object

LR = LinearRegression(fit_intercept=True, normalize=True) Parameters

LR.coef_ , LR.intercept_ Attributes

LR.fit(X, y) , LR.score(X, y) , LR.predict(X_test) Methods

You might also like