Archive: 2022

ML Practice 6_1

Unsupervised Learning No dependent variables and targets. (↔ Supervised Learning) Clustering (Multiple class) Must be many different types of data Linked to deep learning Dimensionality reduction I

ML Practice Tree plot Example

Goal : To change the color of tree plot1!pip install -U matplotlib Requirement already satisfied: matplotlib in c:\programdata\anaconda3\lib\site-packages (3.4.3) Collecting matplotlib Downloading

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