This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Import scikit-learn dataset library | |
from sklearn import datasets | |
#Load dataset | |
wine = datasets.load_wine() | |
# print the names of the 13 features | |
print("Features: ", wine.feature_names) | |
# print the label type of wine(class_0, class_1, class_2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# importing libraries | |
import numpy as nm | |
import matplotlib.pyplot as mtp | |
import pandas as pd | |
#importing datasets | |
data_set= pd.read_csv('/kaggle/input/iris-flower-dataset/IRIS.csv') | |
#Extracting Independent and dependent Variable | |
from sklearn.preprocessing import OrdinalEncoder | |
from sklearn.preprocessing import LabelEncoder | |
y=data_set['species'].astype(str) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
dataset = pd.read_csv("/kaggle/input/iris-flower-dataset/IRIS.csv") | |
dataset.head() | |
Features=["sepal_length","sepal_width","petal_length","petal_width"] | |
X=dataset[Features] | |
y=dataset.species | |
from sklearn.model_selection import train_test_split | |
X_train, X_test, y_train, y_test = train_test_split(X,y,test_size=0.3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#importing basic library | |
import numpy as np | |
import pandas as pd | |
#loading dataset | |
data_frame= pd.read_csv('/kaggle/input/iris-flower-dataset/IRIS.csv') | |
#preparing data | |
feature=['sepal_length','sepal_width','petal_length','petal_width'] | |
X=data_frame[feature] | |
y=data_frame.species | |
#dividing into train test set |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#importing libraries | |
import pandas as pd | |
import numpy as np | |
from sklearn.model_selection import train_test_split | |
from sklearn.preprocessing import StandardScaler | |
from sklearn.ensemble import RandomForestRegressor | |
from sklearn import metrics | |
import matplotlib.pyplot as plt | |
#load_dataset | |
dataset= pd.read_csv('/kaggle/input/usa-housing/USA_Housing.csv') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#importing libraries | |
import pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
%matplotlib inline | |
#loading dataset | |
dataset = pd.read_csv("/kaggle/input/decision-tree-data-set-from-stack-abuse/bill_authentication.csv") | |
#data analysis | |
dataset.shape | |
dataset.head() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import libraries | |
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as mtp | |
# loding data set | |
data=pd.read_csv("/kaggle/input/years-of-experience-and-salary-dataset/Salary_Data.csv") | |
#having a look on data set | |
data.head(15) | |
#extracting dependent and independent variables | |
Y=data["Salary"] |