SlideShare a Scribd company logo
1 of 28
Download to read offline
스마트폰 화상 키보드
입력 패턴 분석 및 오타 보정
2014147575 도회린
2014147583 이정현
2014147528 한호재
진행 일정 및 개요
프로젝트 진행 일정
10월 11월
시각화
상황
예측
데이터 분석
데이터
전처리
오타 개선 알고리즘 제안분석
사용자 상황
분류기 제작 및 최적화
선정 결과
시각화
유의미한 데이터 선정
주 담당자
이정현
한호재
도회린
프로젝트 진행 환경
• 분석 환경
• OS : Ubuntu 14.04 / Windows 7
• 언어 : Python 2.7.6
• 사용 Python 라이브러리 목록
• numpy 1.10.1
• pandas 0.13.1
• scikit-learn 0.17
• matplotlib 1.5.0
• ipython (notebook 이용) 4.0.1
용어의 정의
• 상황 : 유저의 자세(앉기, 서기, 걷기, 눕기)와 이용하는 손(왼손, 오른손,
양손)을 교차하여 만들어지는 12가지의 경우.
• 입력 패턴 : 유저가 문자를 입력하는 속도, 누른 좌표, 방향 센서 등의 로그
데이터에 남아있는 모든 정보들로부터 유추되는 경향성.
• 분류기 : Classifier. 입력된 값으로부터 상황을 분류해내는 알고리즘.
분석 문제 및 목표
데이터 시각화 및 유의미한 변인 선정
• 주어진 센서 데이터 값들과 유저의 상황간의 상관 관계를 계산하고 이를
시각적으로 도출.
• 사용자의 정보와 오타율의 상관 관계를 파악하고 이를 시각적으로 도출.
• 파악된 상관 관계를 토대로 유저의 상황을 예측하고 그 상황에 맞는 오타
보정 방안 제시에 활용.
유저 상황 예측
• 앞의 단계에서 파악된 유의미한 상관 관계를 가진 입력 데이터를 활용하여
입력 상황을 예측.
• Scikit-learn 라이브러리에 있는 분류(Classification) 알고리즘을 이용.
• 로그의 일부는 학습(Training), 다른 일부는 검증(Test) 데이터로 이용하여
최적의 분류를 할 수 있도록 튜닝.
오타 보정
• 키보드 조건, 사용하는 손에 따른 경향성을 파악
• 앞의 단계에서 파악한 입력 패턴과 유저의 상황을 바탕으로, 오타를 최소화
하기 위한 방안을 대략적으로 제시.
• 주어진 로그 데이터를 이용하여, 오타 보정 방안에 따라 얼마나 개선이 이루
어지는지 확인.
분석 과정
분석 과정
데이터 전처리 데이터 시각화 및 유의미한 칼럼 선정
상황별 오타 개선 알고리즘 제안 입력 상황 분류기 제작
데이터 전처리
주어진 데이터는 무의미한 값이 있거나,
일부는 오류가 존재한다. 이를 다음의
기준으로 전처리 하였다.
• 모든 Column의 이름을 소문자로 통일,
앞 뒤의 무의미한 공백 제거
• 120개(손 3 × 자세 4 × 횟수 10)보다
적은 수의 데이터는 삭제
class DataLoader:
data_save = None
threshold = 120
age_useless = []
def __init__(self):
data_save_raw = read_csv('data/save.csv')
# Remove useless whitespace
self.data_save =
data_save_raw.rename(columns=lambda x:
x.strip().lower())
# Remove unsufficient data
data_count = self.data_save.groupby('age').count()
self.age_useless.append(
data_count[data_count < self.threshold].index)
def get_save_data(self):
return self.remove_useless(self.data_save)
def remove_useless(self, data):
for age in self.age_useless[0]:
data = data[data['age'] != age]
return data
데이터 시각화
• 센서 값들과 사용자의 상황 및 오타
율에 대한 다양한 그래프를 그린다.
• 위의 결과를 바탕으로, 입력 상황 예
측에 명확히 사용할 수 있을 것으로
추측되는 Column들을 선정한다.
matplotlib.style.use('ggplot')
loader = DataLoader()
data = loader.get_sensor_data()
# Set columns
posture_gyro =
data.groupby('input_posture')
.mean()[['gyro_x', 'gyro_y', 'gyro_z']]
# Bar Graph
posture_gyro.plot(kind='bar')
plt.show()
사용 알고리즘
• Random Forest : 반복적으로 무작위적인 Dicision Tree를 만들어 이를
최적화하는 방향으로 진행하는 알고리즘이다. 뚜렷한 경향성이 있는 데이터
들을 이용하여 간단하고 빠르게 분류기를 만들 수 있다.
from sklearn.ensemble import RandomForestClassifier
rf = RandomForestClassifier(n_estimators=100, max_depth=30, max_leaf_nodes=100)
rf.fit(trainX, trainY)
입력 상황 예측 소스 코드
for group in range(1, 4):
data_raw = raw_loader.load_eval(str(group))
for idx in data_raw.index:
data = data_raw.ix[idx]
data_sensor = raw_loader.load_sensor_data(data['file name'])
posture = data['input posture']
if posture == 'Both':
posture = 1
elif posture == 'Right':
posture = 2
else:
posture = 0
combined_data.append([posture,
data_sensor.acc_x.var(),
...
data_sensor.gyro_z.mean()])
오타 보정 알고리즘
ascii_num = 99
hands = ['Both', 'Right', 'Left']
raw_of_all = data_key[data_key['intent_code_point']==ascii_num]
raw_of_alphabet =
data_key[data_key['intent_code_point']==ascii_num][data_key['code_point']!=ascii_num]
result = []
for hand in hands:
data_all = raw_of_all[raw_of_all['input_posture']==hand]
data_all = data_all.groupby('keyboard_condition').count()['time']
data_of_alphabet = raw_of_alphabet[raw_of_alphabet['input_posture']==hand]
data_by_condition = data_of_alphabet.groupby('keyboard_condition').count()['time']
# For each keyboard status
result_both = data_by_condition[data_by_condition.index%4==0].sum()
/ data_all[data_all.index%4==0].sum()
...
result_split = data_by_condition[data_by_condition.index%4==3].sum()
/ data_all[data_all.index%4==3].sum()
result.append([result_both, result_left, result_right, result_split])
분석 결과
데이터 시각화 가속도 센서
가속도 센서 변화와 사용하는 손, 자세의 상관관계.
• 오른손 : x축 방향의 가속도가 음의 경향이 두드러짐
• 눕기 : z축 방향의 가속도가 다른 조건에 비해 0에
가까움
양손 왼손 오른손
눕기 앉기 서기 걷기
데이터 시각화 회전 센서
회전 센서 변화와 사용하는 손, 자세의 상관관계.
• 오른손 : roll의 양의 경향이 두드러짐
• 눕기 : roll의 음의 경향, azim의 양의 경향이
두드러짐
양손 왼손 오른손
눕기 앉기 서기 걷기
데이터 시각화 자이로스코프
자이로스코프 값과 사용하는 손, 자세의 상관관계.
• 양손 : y축과 z축의 자이로스코프 값이 유사함
• 왼손 : y축의 값 보다 z축의 값이 더 큼
• 오른손 : y축의 값이 z축의 값 보다 더 큼
• 걷기 : y축, z축의 값이 다른 조건에 비해 매우 큼
양손 왼손 오른손
눕기 앉기 서기 걷기
데이터 시각화 조건 별 오타율
사용 손, 자세, 성별,
이용 기간 등의 모든 변인에서
명확한 상관 관계를 찾기 어려움
• 위의 데이터 시각화 결과를 종합하여 볼 때, 사용하는 손을 구분할 수 있는
변인들은 충분한 것으로 보인다.
• 자세의 경우, ‘눕기’와 ‘걷기’는 구분하기 명확한 것으로 보이지만 나머지
자세인 ‘앉기’와 ‘서기’는 정확하게 구분할 만한 차이점을 발견하기 어렵다.
데이터 시각화
입력 상황 예측 결과 사용 손
Random Forest 알고리즘을 이용하여 센서 값을 바탕으로 사용한 손을 예측
한 결과, 약 80.92%의 정확도를 보였다.
입력 상황 예측 결과 자세
센서 값을 바탕으로 자세를 예측한 결
과, 약 64.26%의 정확도를 보였다.
아래는 실제 값과 예측 결과를 비교한
것으로, 앉은 상태와 서있는 상태를 잘
구분해내지 못하는 것을 알 수 있다.
0 : lie
1 : sit
2 : stand
3 : walk
오타 보정 알고리즘
• A는 키보드의 가장 좌측에 위치한다.
• 오른손을 사용할 경우 거리가 멀어
우편향된 키보드를 사용시 오타가
개선된다.
알파벳 A
양손 오른손 왼손
오
타
율
키보드 종류
오타 보정 알고리즘
• H는 키보드의 중앙에 위치한다.
• 양손 및 오른손을 이용할 경우,
Split 키보드를 이용하면 오타율이
감소한다.
알파벳 H
양손 오른손 왼손
오
타
율
키보드 종류
오타 보정 알고리즘
• H는 키보드의 중하단에 위치한다.
• 양손을 이용할 경우 Split 키보드를
이용하면 오타율이 감소한다.
알파벳 N
양손 오른손 왼손
오
타
율
키보드 종류
오타 보정 알고리즘
• U는 키보드의 우측에 위치한다.
• 왼손을 사용할 경우 거리가 멀어
좌편향된 키보드를 사용시 오타가
소폭 개선된다.
알파벳 U
양손 오른손 왼손
오
타
율
키보드 종류

More Related Content

Recently uploaded

JMP를 활용한 가속열화 분석 사례
JMP를 활용한 가속열화 분석 사례JMP를 활용한 가속열화 분석 사례
JMP를 활용한 가속열화 분석 사례JMP Korea
 
JMP가 걸어온 여정, 새로운 도약 JMP 18!
JMP가 걸어온 여정, 새로운 도약 JMP 18!JMP가 걸어온 여정, 새로운 도약 JMP 18!
JMP가 걸어온 여정, 새로운 도약 JMP 18!JMP Korea
 
JMP 기능의 확장 및 내재화의 핵심 JMP-Python 소개
JMP 기능의 확장 및 내재화의 핵심 JMP-Python 소개JMP 기능의 확장 및 내재화의 핵심 JMP-Python 소개
JMP 기능의 확장 및 내재화의 핵심 JMP-Python 소개JMP Korea
 
JMP를 활용한 전자/반도체 산업 Yield Enhancement Methodology
JMP를 활용한 전자/반도체 산업 Yield Enhancement MethodologyJMP를 활용한 전자/반도체 산업 Yield Enhancement Methodology
JMP를 활용한 전자/반도체 산업 Yield Enhancement MethodologyJMP Korea
 
실험 설계의 평가 방법: Custom Design을 중심으로 반응인자 최적화 및 Criteria 해석
실험 설계의 평가 방법: Custom Design을 중심으로 반응인자 최적화 및 Criteria 해석실험 설계의 평가 방법: Custom Design을 중심으로 반응인자 최적화 및 Criteria 해석
실험 설계의 평가 방법: Custom Design을 중심으로 반응인자 최적화 및 Criteria 해석JMP Korea
 
데이터 분석 문제 해결을 위한 나의 JMP 활용법
데이터 분석 문제 해결을 위한 나의 JMP 활용법데이터 분석 문제 해결을 위한 나의 JMP 활용법
데이터 분석 문제 해결을 위한 나의 JMP 활용법JMP Korea
 
공학 관점에서 바라본 JMP 머신러닝 최적화
공학 관점에서 바라본 JMP 머신러닝 최적화공학 관점에서 바라본 JMP 머신러닝 최적화
공학 관점에서 바라본 JMP 머신러닝 최적화JMP Korea
 

Recently uploaded (7)

JMP를 활용한 가속열화 분석 사례
JMP를 활용한 가속열화 분석 사례JMP를 활용한 가속열화 분석 사례
JMP를 활용한 가속열화 분석 사례
 
JMP가 걸어온 여정, 새로운 도약 JMP 18!
JMP가 걸어온 여정, 새로운 도약 JMP 18!JMP가 걸어온 여정, 새로운 도약 JMP 18!
JMP가 걸어온 여정, 새로운 도약 JMP 18!
 
JMP 기능의 확장 및 내재화의 핵심 JMP-Python 소개
JMP 기능의 확장 및 내재화의 핵심 JMP-Python 소개JMP 기능의 확장 및 내재화의 핵심 JMP-Python 소개
JMP 기능의 확장 및 내재화의 핵심 JMP-Python 소개
 
JMP를 활용한 전자/반도체 산업 Yield Enhancement Methodology
JMP를 활용한 전자/반도체 산업 Yield Enhancement MethodologyJMP를 활용한 전자/반도체 산업 Yield Enhancement Methodology
JMP를 활용한 전자/반도체 산업 Yield Enhancement Methodology
 
실험 설계의 평가 방법: Custom Design을 중심으로 반응인자 최적화 및 Criteria 해석
실험 설계의 평가 방법: Custom Design을 중심으로 반응인자 최적화 및 Criteria 해석실험 설계의 평가 방법: Custom Design을 중심으로 반응인자 최적화 및 Criteria 해석
실험 설계의 평가 방법: Custom Design을 중심으로 반응인자 최적화 및 Criteria 해석
 
데이터 분석 문제 해결을 위한 나의 JMP 활용법
데이터 분석 문제 해결을 위한 나의 JMP 활용법데이터 분석 문제 해결을 위한 나의 JMP 활용법
데이터 분석 문제 해결을 위한 나의 JMP 활용법
 
공학 관점에서 바라본 JMP 머신러닝 최적화
공학 관점에서 바라본 JMP 머신러닝 최적화공학 관점에서 바라본 JMP 머신러닝 최적화
공학 관점에서 바라본 JMP 머신러닝 최적화
 

Featured

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 

Featured (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

스마트폰 화상 키보드 입력 패턴 분석 및 오타 보정

  • 1. 스마트폰 화상 키보드 입력 패턴 분석 및 오타 보정 2014147575 도회린 2014147583 이정현 2014147528 한호재
  • 3. 프로젝트 진행 일정 10월 11월 시각화 상황 예측 데이터 분석 데이터 전처리 오타 개선 알고리즘 제안분석 사용자 상황 분류기 제작 및 최적화 선정 결과 시각화 유의미한 데이터 선정 주 담당자 이정현 한호재 도회린
  • 4. 프로젝트 진행 환경 • 분석 환경 • OS : Ubuntu 14.04 / Windows 7 • 언어 : Python 2.7.6 • 사용 Python 라이브러리 목록 • numpy 1.10.1 • pandas 0.13.1 • scikit-learn 0.17 • matplotlib 1.5.0 • ipython (notebook 이용) 4.0.1
  • 5. 용어의 정의 • 상황 : 유저의 자세(앉기, 서기, 걷기, 눕기)와 이용하는 손(왼손, 오른손, 양손)을 교차하여 만들어지는 12가지의 경우. • 입력 패턴 : 유저가 문자를 입력하는 속도, 누른 좌표, 방향 센서 등의 로그 데이터에 남아있는 모든 정보들로부터 유추되는 경향성. • 분류기 : Classifier. 입력된 값으로부터 상황을 분류해내는 알고리즘.
  • 7. 데이터 시각화 및 유의미한 변인 선정 • 주어진 센서 데이터 값들과 유저의 상황간의 상관 관계를 계산하고 이를 시각적으로 도출. • 사용자의 정보와 오타율의 상관 관계를 파악하고 이를 시각적으로 도출. • 파악된 상관 관계를 토대로 유저의 상황을 예측하고 그 상황에 맞는 오타 보정 방안 제시에 활용.
  • 8. 유저 상황 예측 • 앞의 단계에서 파악된 유의미한 상관 관계를 가진 입력 데이터를 활용하여 입력 상황을 예측. • Scikit-learn 라이브러리에 있는 분류(Classification) 알고리즘을 이용. • 로그의 일부는 학습(Training), 다른 일부는 검증(Test) 데이터로 이용하여 최적의 분류를 할 수 있도록 튜닝.
  • 9. 오타 보정 • 키보드 조건, 사용하는 손에 따른 경향성을 파악 • 앞의 단계에서 파악한 입력 패턴과 유저의 상황을 바탕으로, 오타를 최소화 하기 위한 방안을 대략적으로 제시. • 주어진 로그 데이터를 이용하여, 오타 보정 방안에 따라 얼마나 개선이 이루 어지는지 확인.
  • 11. 분석 과정 데이터 전처리 데이터 시각화 및 유의미한 칼럼 선정 상황별 오타 개선 알고리즘 제안 입력 상황 분류기 제작
  • 12. 데이터 전처리 주어진 데이터는 무의미한 값이 있거나, 일부는 오류가 존재한다. 이를 다음의 기준으로 전처리 하였다. • 모든 Column의 이름을 소문자로 통일, 앞 뒤의 무의미한 공백 제거 • 120개(손 3 × 자세 4 × 횟수 10)보다 적은 수의 데이터는 삭제 class DataLoader: data_save = None threshold = 120 age_useless = [] def __init__(self): data_save_raw = read_csv('data/save.csv') # Remove useless whitespace self.data_save = data_save_raw.rename(columns=lambda x: x.strip().lower()) # Remove unsufficient data data_count = self.data_save.groupby('age').count() self.age_useless.append( data_count[data_count < self.threshold].index) def get_save_data(self): return self.remove_useless(self.data_save) def remove_useless(self, data): for age in self.age_useless[0]: data = data[data['age'] != age] return data
  • 13. 데이터 시각화 • 센서 값들과 사용자의 상황 및 오타 율에 대한 다양한 그래프를 그린다. • 위의 결과를 바탕으로, 입력 상황 예 측에 명확히 사용할 수 있을 것으로 추측되는 Column들을 선정한다. matplotlib.style.use('ggplot') loader = DataLoader() data = loader.get_sensor_data() # Set columns posture_gyro = data.groupby('input_posture') .mean()[['gyro_x', 'gyro_y', 'gyro_z']] # Bar Graph posture_gyro.plot(kind='bar') plt.show()
  • 14. 사용 알고리즘 • Random Forest : 반복적으로 무작위적인 Dicision Tree를 만들어 이를 최적화하는 방향으로 진행하는 알고리즘이다. 뚜렷한 경향성이 있는 데이터 들을 이용하여 간단하고 빠르게 분류기를 만들 수 있다. from sklearn.ensemble import RandomForestClassifier rf = RandomForestClassifier(n_estimators=100, max_depth=30, max_leaf_nodes=100) rf.fit(trainX, trainY)
  • 15. 입력 상황 예측 소스 코드 for group in range(1, 4): data_raw = raw_loader.load_eval(str(group)) for idx in data_raw.index: data = data_raw.ix[idx] data_sensor = raw_loader.load_sensor_data(data['file name']) posture = data['input posture'] if posture == 'Both': posture = 1 elif posture == 'Right': posture = 2 else: posture = 0 combined_data.append([posture, data_sensor.acc_x.var(), ... data_sensor.gyro_z.mean()])
  • 16. 오타 보정 알고리즘 ascii_num = 99 hands = ['Both', 'Right', 'Left'] raw_of_all = data_key[data_key['intent_code_point']==ascii_num] raw_of_alphabet = data_key[data_key['intent_code_point']==ascii_num][data_key['code_point']!=ascii_num] result = [] for hand in hands: data_all = raw_of_all[raw_of_all['input_posture']==hand] data_all = data_all.groupby('keyboard_condition').count()['time'] data_of_alphabet = raw_of_alphabet[raw_of_alphabet['input_posture']==hand] data_by_condition = data_of_alphabet.groupby('keyboard_condition').count()['time'] # For each keyboard status result_both = data_by_condition[data_by_condition.index%4==0].sum() / data_all[data_all.index%4==0].sum() ... result_split = data_by_condition[data_by_condition.index%4==3].sum() / data_all[data_all.index%4==3].sum() result.append([result_both, result_left, result_right, result_split])
  • 18. 데이터 시각화 가속도 센서 가속도 센서 변화와 사용하는 손, 자세의 상관관계. • 오른손 : x축 방향의 가속도가 음의 경향이 두드러짐 • 눕기 : z축 방향의 가속도가 다른 조건에 비해 0에 가까움 양손 왼손 오른손 눕기 앉기 서기 걷기
  • 19. 데이터 시각화 회전 센서 회전 센서 변화와 사용하는 손, 자세의 상관관계. • 오른손 : roll의 양의 경향이 두드러짐 • 눕기 : roll의 음의 경향, azim의 양의 경향이 두드러짐 양손 왼손 오른손 눕기 앉기 서기 걷기
  • 20. 데이터 시각화 자이로스코프 자이로스코프 값과 사용하는 손, 자세의 상관관계. • 양손 : y축과 z축의 자이로스코프 값이 유사함 • 왼손 : y축의 값 보다 z축의 값이 더 큼 • 오른손 : y축의 값이 z축의 값 보다 더 큼 • 걷기 : y축, z축의 값이 다른 조건에 비해 매우 큼 양손 왼손 오른손 눕기 앉기 서기 걷기
  • 21. 데이터 시각화 조건 별 오타율 사용 손, 자세, 성별, 이용 기간 등의 모든 변인에서 명확한 상관 관계를 찾기 어려움
  • 22. • 위의 데이터 시각화 결과를 종합하여 볼 때, 사용하는 손을 구분할 수 있는 변인들은 충분한 것으로 보인다. • 자세의 경우, ‘눕기’와 ‘걷기’는 구분하기 명확한 것으로 보이지만 나머지 자세인 ‘앉기’와 ‘서기’는 정확하게 구분할 만한 차이점을 발견하기 어렵다. 데이터 시각화
  • 23. 입력 상황 예측 결과 사용 손 Random Forest 알고리즘을 이용하여 센서 값을 바탕으로 사용한 손을 예측 한 결과, 약 80.92%의 정확도를 보였다.
  • 24. 입력 상황 예측 결과 자세 센서 값을 바탕으로 자세를 예측한 결 과, 약 64.26%의 정확도를 보였다. 아래는 실제 값과 예측 결과를 비교한 것으로, 앉은 상태와 서있는 상태를 잘 구분해내지 못하는 것을 알 수 있다. 0 : lie 1 : sit 2 : stand 3 : walk
  • 25. 오타 보정 알고리즘 • A는 키보드의 가장 좌측에 위치한다. • 오른손을 사용할 경우 거리가 멀어 우편향된 키보드를 사용시 오타가 개선된다. 알파벳 A 양손 오른손 왼손 오 타 율 키보드 종류
  • 26. 오타 보정 알고리즘 • H는 키보드의 중앙에 위치한다. • 양손 및 오른손을 이용할 경우, Split 키보드를 이용하면 오타율이 감소한다. 알파벳 H 양손 오른손 왼손 오 타 율 키보드 종류
  • 27. 오타 보정 알고리즘 • H는 키보드의 중하단에 위치한다. • 양손을 이용할 경우 Split 키보드를 이용하면 오타율이 감소한다. 알파벳 N 양손 오른손 왼손 오 타 율 키보드 종류
  • 28. 오타 보정 알고리즘 • U는 키보드의 우측에 위치한다. • 왼손을 사용할 경우 거리가 멀어 좌편향된 키보드를 사용시 오타가 소폭 개선된다. 알파벳 U 양손 오른손 왼손 오 타 율 키보드 종류