“Scikit Learn” Réponses codées

Scikit apprend PCA

from sklearn.decomposition import KernelPCA
kpca = KernelPCA(n_components = 2, kernel = 'rbf')
X_train = kpca.fit_transform(X_train)
X_test = kpca.transform(X_test)
Ultimate Gohan

Scikit Learn

import tensorflow as tf


Arrogant Ant

sklearn

from sklearn import linear_model
regr = linear_model.LinearRegression()
train_x = np.asanyarray(train[['ENGINESIZE']])
train_y = np.asanyarray(train[['CO2EMISSIONS']])
regr.fit (train_x, train_y)
# The coefficients
print ('Coefficients: ', regr.coef_)
print ('Intercept: ',regr.intercept_)
Upset Unicorn

Scikit Learn

from sklearn import tree
X = [[0, 0], [1, 1]]
Y = [0, 1]
clf = tree.DecisionTreeClassifier()
clf = clf.fit(X, Y)

# python3 -m venv sklearn-venvpython -m venv sklearn-venvpython -m venv sklearn-venvsource sklearn-venv/bin/activatesource sklearn-venv/bin/activatesklearn-venv\Scripts\activatepip install -U scikit-learnpip install -U scikit-learnpip install -U scikit-learnpip3 install -U scikit-learnconda create -n sklearn-envconda activate sklearn-envconda install scikit-learn
Busy Barracuda

Scikit-apprend

Simple and efficient tools for predictive data analysis
Amin

Réponses similaires à “Scikit Learn”

Questions similaires à “Scikit Learn”

Plus de réponses similaires à “Scikit Learn” dans Python

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code