Python Machine Learning Data Pre-Processing Template: Revision history

From Federal Burro of Information
Jump to navigationJump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

17 February 2023

  • curprev 23:5123:51, 17 February 2023ā€Ž David talk contribsā€Ž 434 bytes +434ā€Ž Created page with " <pre> import numpy as np import matplotlib.pyplot as plt import pandas as pd dataset = pd.read_csv('filename.csv') X = dataset.iloc[:, :-1].values y = dataset.iloc[:, -1].values 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 = 81 ) </pre> source: Udemey "Machine Learning A-Zā„¢: Python & R in Data Science [2023]" category:script"