Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove preprocessing warnings #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Code/Day 11 K-NN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<img src="https://github.com/Avik-Jain/100-Days-Of-ML-Code/blob/master/Info-graphs/Day%207.jpg">
</p>

## The DataSet | Social Network
## The DataSet | Social Network

<p align="center">
<img src="https://github.com/Avik-Jain/100-Days-Of-ML-Code/blob/master/Other%20Docs/data.PNG">
</p>
</p>


## Importing the libraries
Expand All @@ -27,7 +27,7 @@ y = dataset.iloc[:, 4].values

## Splitting the dataset into the Training set and Test set
```python
from sklearn.cross_validation import train_test_split
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.25, random_state = 0)
```
## Feature Scaling
Expand Down
2 changes: 1 addition & 1 deletion Code/Day 13 SVM.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ y = dataset.iloc[:, 4].values

## Splitting the dataset into the Training set and Test set
```python
from sklearn.cross_validation import train_test_split
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.25, random_state = 0)
```

Expand Down
4 changes: 2 additions & 2 deletions Code/Day 1_Data PreProcessing.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ X = onehotencoder.fit_transform(X).toarray()
labelencoder_Y = LabelEncoder()
Y = labelencoder_Y.fit_transform(Y)
```
## Step 5: Splitting the datasets into training sets and Test sets
## Step 5: Splitting the datasets into training sets and Test sets
```python
from sklearn.cross_validation import train_test_split
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)
```

Expand Down
2 changes: 1 addition & 1 deletion Code/Day 25 Decision Tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ y = dataset.iloc[:, 4].values
```
### Splitting the dataset into the Training set and Test set
```python
from sklearn.cross_validation import train_test_split
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.25, random_state = 0)
```

Expand Down
2 changes: 1 addition & 1 deletion Code/Day 34 Random_Forest.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ y = dataset.iloc[:, 4].values
```
### Splitting the dataset into the Training set and Test set
```python
from sklearn.cross_validation import train_test_split
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.25, random_state = 0)
```

Expand Down
12 changes: 6 additions & 6 deletions Code/Day 6 Logistic Regression.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<img src="https://github.com/Avik-Jain/100-Days-Of-ML-Code/blob/master/Info-graphs/Day%204.jpg">
</p>

## The DataSet | Social Network
## The DataSet | Social Network

<p align="center">
<img src="https://github.com/Avik-Jain/100-Days-Of-ML-Code/blob/master/Other%20Docs/data.PNG">
</p>
</p>

This dataset contains information of users in a social network. Those informations are the user id the gender the age and the estimated salary. A car company has just launched their brand new luxury SUV. And we're trying to see which of these users of the social network are going to buy this brand new SUV And the last column here tells If yes or no the user bought this SUV we are going to build a model that is going to predict if a user is going to buy or not the SUV based on two variables which are going to be the age and the estimated salary. So our matrix of feature is only going to be these two columns.
This dataset contains information of users in a social network. Those information are the user id the gender the age and the estimated salary. A car company has just launched their brand new luxury SUV. And we're trying to see which of these users of the social network are going to buy this brand new SUV And the last column here tells If yes or no the user bought this SUV we are going to build a model that is going to predict if a user is going to buy or not the SUV based on two variables which are going to be the age and the estimated salary. So our matrix of feature is only going to be these two columns.
We want to find some correlations between the age and the estimated salary of a user and his decision to purchase yes or no the SUV.

## Step 1 | Data Pre-Processing
Expand All @@ -35,7 +35,7 @@ y = dataset.iloc[:, 4].values
### Splitting the dataset into the Training set and Test set

```python
from sklearn.cross_validation import train_test_split
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.25, random_state = 0)
```

Expand Down Expand Up @@ -83,8 +83,8 @@ cm = confusion_matrix(y_test, y_pred)

<p align="center">
<img src="https://github.com/Avik-Jain/100-Days-Of-ML-Code/blob/master/Other%20Docs/training.png">
</p>
</p>

<p align="center">
<img src="https://github.com/Avik-Jain/100-Days-Of-ML-Code/blob/master/Other%20Docs/testing.png">
</p>
</p>
10 changes: 5 additions & 5 deletions Code/Day2_Simple_Linear_Regression.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ dataset = pd.read_csv('studentscores.csv')
X = dataset.iloc[ : , : 1 ].values
Y = dataset.iloc[ : , 1 ].values

from sklearn.cross_validation import train_test_split
X_train, X_test, Y_train, Y_test = train_test_split( X, Y, test_size = 1/4, random_state = 0)
from sklearn.model_selection import train_test_split
X_train, X_test, Y_train, Y_test = train_test_split( X, Y, test_size = 1/4, random_state = 0)
```

# Step 2: Fitting Simple Linear Regression Model to the training set
Expand All @@ -30,8 +30,8 @@ X_train, X_test, Y_train, Y_test = train_test_split( X, Y, test_size = 1/4, rand
```python
Y_pred = regressor.predict(X_test)
```
# Step 4: Visualization

# Step 4: Visualization
## Visualising the Training results
```python
plt.scatter(X_train , Y_train, color = 'red')
Expand All @@ -41,4 +41,4 @@ X_train, X_test, Y_train, Y_test = train_test_split( X, Y, test_size = 1/4, rand
```python
plt.scatter(X_test , Y_test, color = 'red')
plt.plot(X_test , regressor.predict(X_test), color ='blue')
```
```
2 changes: 1 addition & 1 deletion Code/Day3_Multiple_Linear_Regression.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ X = X[: , 1:]

### Splitting the dataset into the Training set and Test set
```python
from sklearn.cross_validation import train_test_split
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)
```
## Step 2: Fitting Multiple Linear Regression to the Training set
Expand Down