N Days_With_Machine_Learning (Part1 )

What is Machine learning ?

let’s Start With Data-Preprocessing

scikit learn
sudo apt-get update
sudo apt-get -y install python-pip
sudo apt-get install python3-matplotlib
sudo pip3 install numpy
sudo pip3 install pandas
sudo pip3 install scipy
sudo pip3 install -U scikit-learn

Now let’s start coding

# Imporitng the libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Importing the dataset
dataset = pd.read_csv('Data.csv');
X = dataset.iloc[:,:-1].values
Y = dataset.iloc[:,3].values
from sklearn.preprocessing import Imputer 
imputer = Imputer(missing_values='NaN',strategy='mean',axis=0)
imputer = imputer.fit(X[:,1:3])
X[:,1:3]= imputer.transform(X[:,1:3])
from sklearn import preprocessing
from sklearn.preprocessing import OneHotEncoder
le = preprocessing.LabelEncoder()
enc = OneHotEncoder(categorical_features=[0])
X[:,0]= le.fit_transform(X[:,0])
X = enc.fit_transform(X).toarray();
Y = le.fit_transform(Y)
from sklearn.model_selection import train_test_split
X_Train ,X_Test , Y_Train,Y_Test= train_test_split(X,Y, test_size=0.2,random_state=0)
print('**************testing data**********')
from sklearn.preprocessing import StandardScaler
scaler = StandardScaler()
X_train = scaler.fit_transform(X_Train)
X_Test =scaler.transform(X_Test)'''

Develop a passion for learning. If you do, you will never cease to grow.




<script>alert('try your best')</script>

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Unsupervised Learning with Text Data: Finding Periods in Stephen King’s Writing with…


8 Popular Python Libraries In Finance Industry

Rapid fractional differencing to minimize memory loss while making a time series stationary

Skills Data Mining Specialists need to Master in 2020

Decoding The Success Factors for Co-working Space

Top 5 Embedded Business Intelligence Best Practices

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Rebai Ahmed

Rebai Ahmed

<script>alert('try your best')</script>

More from Medium

Revisiting Classical Deep Learning Research Paper — ALEXNET

Image of Geoffrey Hinton, Ilya Sutskever, Alex krizhevsky

Speech Emotion recognition using Convolution Neural Networks

Flattening CNN layers for Neural Network and basic concepts

Neural Network For Beginners 🧠