Posts

Showing posts from September, 2019
First of all, get into an Environment of Anaconda weather Spyder, Jupyter Notebook and for Business Analytics, it can be Orange. To head-start with this, first: Import Libraries Importing Dataset Distribute dataset to test data and Train dataset Feature Scaling(If needed.) Import Machine Learning Model like SVM, Linear Regression, etc for the dataset. Predicting the Test set results Visualizing the Training set results Visualizing the Test set results These are the main eight Steps to test — train the dataset and get your model Train. For simplicity, Here is the code for Logistic Regression: # Simple Linear Regression # Importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd # Importing the dataset mydataset = pd.read_csv(‘salary.csv’) X = mydataset.iloc[:, :-1].values y = mydataset.iloc[:,:].values # Splitting the dataset into the Training set and Test set from sklearn.cross_validation import train_test_split X_train, X_