Tutorials

https://vvcestudio.com.br/en/tutorial/python/sklearn/
menu

Scikit-learn

What is Scikit-learn?

Scikit-learn is a machine learning library for Python.
It already contains several Machine Learning algorithms.
No need to write the AI algorithms.
It is fully integrated with Numpy and Pandas.

Scikit-learn code example
x
import numpy as np
import pandas as pd

# Using KNN classifier
from sklern.neighbors import KneighborsClassifier
knn=KneighborsClassifier(n_neighbors=3)

#importing the data for sorting
df=pd.read_csv("valente.csv")

# training data
X=df.ix[:,0:4].values

# target classes
y=df[[`target`]].values.ravel()

# teaching the machine.
knn.fit(X,y)

# rate an item
knn.predict([[6.5, 5.5, 4.5, 1.3]])

Rate another item
knn.predict([[1.5, 2.5, 2.0, 0.3]])

How installing SKLEARN on UBUNTU?

To install SKLEARN on PIP3:
x
$ sudo pip3 install scikit-learn
# or
$ pip3 install -U scikit-learn
# or
$ pip3 install sklearn
PIP3 é a linha de comando do Python 3.
To install SKLEARN on PIP:
x
$ sudo pip install scikit-learn
PIP é a linha de comando do Python 2.
To install Python 2 on Linux:
x
$ sudo apt-get install python-sklearn
To install Python 3 on Linux
x
$ sudo apt install python3-sklearn
To installSKLern on Win use:
x
$ pip install -U scikit-learn

Note: SKLern is an abbreviation for scikit-learn.

Logo pythonDiagrama simples aprendizado de maquina.