from sklearn.linear_model import LinearRegression
module = LinearRegression()
module.fit(x, y)
module.score(x, y)
module.predict(test)
from sklearn.linear_model import LogisticRegression
module = LogisticRegression()
module.fit(x, y)
module.score(x, y)
module.predict(test)
from sklearn.neighbors import KNeighborsClassifier
from sklearn.neighbors import KNeighborsRegressor
module = KNeighborsClassifier(n_neighbors=6)
module.fit(x, y)
predicted = module.predict(test)
predicted = module.predict_proba(test)
from sklearn import svm
module = svm.SVC()
module.fit(x, y)
module.score(x, y)
module.predict(test)
module.predict_proba(test)
from sklearn.naive_bayes import GaussianNB
module = GaussianNB()
module.fit(x, y)
predicted = module.predict(test)
from sklearn import tree
module = tree.DecisionTreeClassifier(criterion='gini')
module.fit(x, y)
module.score(x, y)
module.predict(test)
from sklearn.cluster import KMeans
module = KMeans(n_clusters=3, random_state=0)
module.fit(x, y)
module.predict(test)
from sklearn.ensemble import RandomForestClassifier
from sklearn.ensemble import RandomForestRegressor
module = RandomForestClassifier()
module.fit(x, y)
module.predict(test)
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.ensemble import GradientBoostingRegressor
module = GradientBoostingClassifier(n_estimators=100, learning_rate=0.1, max_depth=1, random_state=0)
module.fit(x, y)
module.predict(test)
from sklearn.decomposition import PCA
train_reduced = PCA.fit_transform(train)
test_reduced = PCA.transform(test)