Tags » ML

Basic SVM in Python

In Python we can build SVM model for classification with sklearn library. We can use basic linearsvc or svc with more parameters to tune.
We use the data from sklearn library, and the IDE is sublime text3. 307 more words

Machine Learning

Ensemble with Gradient Boosting in Python

We use the data from sklearn library, and the IDE is sublime text3. Most of the code comes from the book: https://www.goodreads.com/book/show/32439431-introduction-to-machine-learning-with-python?from_search=true

from sklearn.ensemble import GradientBoostingClassifier
import matplotlib.pyplot as plt 
from sklearn.model_selection import train_test_split
from sklearn.datasets import load_breast_cancer

cancer=load_breast_cancer()
X_train, X_test, y_train, y_test = train_test_split(
	cancer.data, cancer.target, random_state=0)
###Gradient boosted regression trees is another ensemble method that combines multiple 
###decision trees to a more powerful model. 192 more words
Data Mining

Ensemble with Random Forest in Python

We use the data from sklearn library, and the IDE is sublime text3. Most of the code comes from the book: https://www.goodreads.com/book/show/32439431-introduction-to-machine-learning-with-python?from_search=true

###1. we import according lib and models
from sklearn.ensemble import RandomForestClassifier
import matplotlib.pyplot as plt 
from sklearn.model_selection import train_test_split
from sklearn.datasets import make_moons

X,y=make_moons(n_samples=100,noise=0.25,random_state=3)
X_train, X_test, y_train, y_test = train_test_split(X,y, stratify=y, random_state=46)

###2. 323 more words
Machine Learning

Decision Tree in Python, with Graphviz to Visualize

Following the last article, we can also use decision tree to evaluate the relationship of breast cancer and all the features within the data. Most of the code comes from the as book of last article. 333 more words

Data Mining

Logistic Regression in Python to Tune Parameter C

The trade-off parameter of logistic regression that determines the strength of the regularization is called C, and higher values of C correspond to less regularization (where we can specify the regularization function).C is actually the Inverse of regularization strength(lambda) 503 more words

Data Mining

Weekly ML drop #11

I’ve become more and more interested in machine learning during last year. This is my way of collecting and sharing interesting reads on the topic I stumble upon. 327 more words

Dsp2017