title: predict() missing 1 required positional argument: 'X' in sklearn LinearRegression
body: <p>I am trying to predict the salary using simple linear regression. Where X is year of experience and y is salary.</p>
  
  <p>This is my code</p>
  
  <pre><code>
  # Importing the libraries
  import numpy as np
  import matplotlib.pyplot as plt
  import pandas as pd
  
  # Importing the dataset
  dataset = pd.read_csv('Salary_Data.csv')
  X = dataset.iloc[:, :-1].values
  y = dataset.iloc[:, 1].values
  
  
  # Splitting the dataset into the Training set and Test set
  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)
  
  # Fitting Simple Linear Regression to the Training Set
  from sklearn.linear_model import LinearRegression
  regressor = LinearRegression
  regressor(X_train, y_train)
  
  # Predicting the Test set results
  Y_pred = regressor.predict(X_test)
  
  </code></pre>
  
  <p>This is my error</p>
  
  <pre><code>Y_pred = regressor.predict(X_test)
  Traceback (most recent call last):
  
    File "&lt;ipython-input-28-e33267d5ef4e&gt;", line 1, in &lt;module&gt;
      Y_pred = regressor.predict(X_test)
  
  TypeError: predict() missing 1 required positional argument: 'X'
  </code></pre>
  
  <p>What am I doing wrong? How can I resolve this issue /error ?</p>