Hi there!

I am a student studying computer science.

728x90

분류 전체보기 127

02. 데이터프레임 생성하기

1. Dictionary 사용 import pandas as pd friend_dict_list = [ {'name' : 'John', 'age' : 25, 'Job' : 'student'}, {'name' : 'Nate', 'age' : 35, 'Job' : 'teacher'} ] df=pd.DataFrame(friend_dict_list) df = df[['name','age','job']] #정렬 입력 순서대로 정렬이 되지 않는다. 다시 정렬해야한다. 2. OrderedDict 사용 from collections import OrderedDict friend_ordered_dict = OrderedDict( [ ('name',['John','Nate']), ('age',[25,30]), ('job'..

AI/Pandas 기초 2020.04.24

ML lec 03 - Linear Regression의 cost 최소화 알고리즘의 원리 설명

Simplified hypothesis H(x) = Wx ${cost(W)} = {{{1}\over{m}} \sum_{i=1}^{m} {Wx^{(i)} - y^{(i)}}}$ W = 1, cost(W) = 0 $ {{1}\over{3}} { ( (1*1-1)^{2} + (1*2-1)^{2} + (1*3-1)^{2} )} $ W = 0, cost(W) = 4.67 ${{1}\over{3}}{((0*1-1)^{2} +(0*2-1)^{2} +(0*3-1)^{2})}$ W = 2, cost(W) = 4.67 ${{1}\over{3}}{((2*1-1)^{2} +(2*2-1)^{2} +(2*3-1)^{2})}$ What cost(W) looks like? ${cost(W)} = {{1}\over{m}} {\sum_..

ML lec 02 - Linear Regression의 Hypothesis 와 cost 설명

(Linear) Hypothesis H(x) = Wx + b W와 b에 따라 가설이 결정된다. Which hypothesis is better? 차이가 적을 때! Cost function (Loss function) $H(x) - y$ How fit the line to our(training) data $(H(x) - y)^2$ 차이를 더 잘 알 수 있다! $cost = {\sum_{i=1}^{m} {(H(x^{(i)}) - y^{(i)}) ^2}}$ 여기에 $H(x) = Wx + b$ 을 적용하면 $${cost(W, b)} = {{1}\over{m}} {\sum_{i=1}^{m} {(H(x^{(i)}) - y^{(i)}) ^2}}$$ Goal : Minimize cost minimize cost(W,b)

ML lec 01 - 기본적인 Machine Learning 의 용어와 개념 설명

- ML : Machine Learning 기계학습 - learning : 학습 - regression 회기 - classification 분류 Suervised / Unsupervised learning Suervised learning learning with labeled examples - training set 지도학습 Training data set을 통해서 Unsupervised learning Google news groping Word clustering 비지도학습 데이터를 스스로 학습 Types of supervised learning Predicting final exam score based on time spent // 0~100 regression // 회기 Pass/non - ..

모두를 위한 머신러닝/딥러닝 강의

http://hunkim.github.io/ml/ 모두를 위한 머신러닝/딥러닝 강의 hunkim.github.io 시즌 1 - 딥러닝의 기본 Schedule Machine learing basic consepts Linear regression Logistic regression (classification) Multivariable (Vector) linear/logistic regression Neural networks Deep learning CNN RNN Bidirectional Neural networks Acknowledgement Andrew Ng's ML class https://class.coursera.org/ml-003/lecture http://www.holehouse.org/ml..

01. 파일에서 데이터 불러오기

df = pd.read_csv('data/frined_list.csv') .txt 파일도 가능 파일 읽어오기 df.head() df.tail() 위에 다섯개 아래 다섯개 불러오기 ()안에 숫자 넣을 수 있다. df = pd.read_csv('data/friend_list.txt', delimiter ='\t') tab으로 분리된 txt파일도 확인할 수 있다. df = pd.read_csv('data/frined_list.csv', header = None) 헤더 없을 때 이렇게 해줘야 된다. 안하면 첫번째 데이터가 column이 되어버린다. None으로 하면 0,1, ....가 column이 되고 df.columns = ['name', 'age', 'job'] 이거 처럼 해주면 이름이 생긴다. df = ..

AI/Pandas 기초 2020.04.15
728x90