Machine Learning: Engr. Ejaz Ahmad
Machine Learning: Engr. Ejaz Ahmad
Machine Learning: Engr. Ejaz Ahmad
Engr. Ejaz Ahmad
Common terms
Accuracy
% of correct prediction made by model to the total
observation
Algorithm
A method, function or set of instruction to generate a
machine learning algorithm
Attribute
A quality describing an observation
Common terms
Bias
Bias is error due to overly simplistic in training
data. causes under fitting
Bias matric
Average difference between prediction and
Observed values
Bias Terms
Allow model to represent patterns that do not pass
through the origin
Common terms
Categorical Variables
Variable with a discrete possible set of values
Classification_report
Recall
Amount of true positive rate with compare to the
actual positive event throughout data
Precision
It is the amount of positive predictive value and it is a
measure of the amount of accurate positives your model
claims compared to the number of positives it actually
claims
Classification_report
F1 Error
It is the measure of model performance, it is the
average weight of the precision and recall of the model
from sklearn.svm import SVC
poly_kernel_svm_clf = Pipeline([
("scaler", StandardScaler()),
("svm_clf", SVC(kernel="poly", degree=3, coef0=1,
C=5))
])
poly_kernel_svm_clf.fit(X, y)
2.Method Gaussian RBF Kernel
rbf_kernel_svm_clf = Pipeline([
("scaler", StandardScaler()),
("svm_clf", SVC(kernel="rbf", gamma=5, C=0.001))
])
rbf_kernel_svm_clf.fit(X, y)