Category: python

ML Practice 5_3

Ensemble algorithm that performs best in dealing with structured data Bagging : A method of aggregating results by taking multiple bootstrap samples and training each model. (parallel learning) Random

ML Practice 5_2

Cross Validation: Repeated process of spliting validation set and evaluating model. Train set : Validation set : Test set = 6 : 2 : 2 (generally) Test sets are not used in the model learning proc

ML Practice 5_1

Prepare Data Import wine data set class 0: red wine class 1: white wine 123import pandas as pdwine = pd.read_csv("https://bit.ly/wine_csv_data")print(wine.head()) alcohol sugar pH

ML Practice 4_2

Gradient Descent(경사 하강법): Algorithm for finding the minimum value of a loss function using a sample of a training set stochastic gradient descent(확률적 경사 하강법; SGD) method of randomly selecting one samp

ML Practice 4_1

Prepare DataImport data set1234import pandas as pdfish = pd.read_csv('https://bit.ly/fish_csv_data')print(fish.head()) Species Weight Length Diagonal Height Width 0 Bream 242.0

ML Practice 3_3

Prepare Data123import pandas as pddf = pd.read_csv('https://bit.ly/perch_csv_data')perch_full = df.to_numpy() # Convert Pandas DataFrame to Numpy Array 12345678import numpy as npperch_weig

ML Practice 3_2

Data Set12345678910111213141516171819import numpy as npperch_length = np.array( [8.4, 13.7, 15.0, 16.2, 17.4, 18.0, 18.7, 19.0, 19.6, 20.0, 21.0, 21.0, 21.0, 21.3, 22.0, 22.0, 22.0, 22.0, 22.0

ML Practice 3_1

Prepare DataData Set12345678910111213141516171819import numpy as npperch_length = np.array( [8.4, 13.7, 15.0, 16.2, 17.4, 18.0, 18.7, 19.0, 19.6, 20.0, 21.0, 21.0, 21.0, 21.3, 22.0, 22.0, 22.0

ML Practice 2_2

Prepare data with Numpy12345678fish_length = [25.4, 26.3, 26.5, 29.0, 29.0, 29.7, 29.7, 30.0, 30.0, 30.7, 31.0, 31.0, 31.5, 32.0, 32.0, 32.0, 33.0, 33.0, 33.5, 33.5, 34.0, 34.0, 34.5,

ML Practice 2_1

ML AlgorithmSupervised Learning(지도 학습) Input(입력; independent variable) & Target(타깃; dependent variable) Question with a correct answer Type 1: Classification(분류) Type 2: Regression(예측) Feature(특