[Day 23] Natural Language Processing 모델 만들어 봤다
안녕하세요!
오늘은 Day 23입니다!
DeepLearning.AI의 NLP course에서 배운 것을 새로운 데이터에 적용해 봤다
첫 번째,
텍스트 감정 분석 하려고 Kaggle에서 재무표 텍스트와 감정 (positive, negative)으로 나눴던 데이터를 찾게 되었다
stopwords 없앴다모델 구조는 다음과 같다
여러가지 모델 구조로 훈련했는데 대부분에 과대적합을 볼 수 있었다. 위에 모델의 성능은
과대적합이 텍스트 감정 분석 할 때 흔히 볼 수 있다고 했는데 극복하기 위해 더 노력해야 한다!
자...
두 번째,
텍스트 생성 모델을 만들어 봤다
이번엔 제가 만든 데이터로 모델을 만들어 봤다
1. 텍스트를 토큰화했다
그 다음에 각 문장을 기반으로 subphrase를 생성했다예를 들어자면 I like dogs 문장은 > I - 1, like - 2, dogs - 3
> [ [0,0,1],
[0,1,2],
[1,2,3] ]으로 변경했다
여기도 다양한 모델 계층 구조 해 봤는데 결국엔 아래와 같은 모델 구조로 했다
정확도
손실
그리고 마지막으로 ~ 텍스트 생성해 봤다
['Chelsea', 'Manchester United', 'Arsenal', 'Manchester City', 'Tottenham', 'Best team was', 'Against the wall', 'The FA cup was hard but', 'The season was filled with hardships and', 'In the end, the best team was', 'Some teams performed bad, so they were']
이 프롬프트로 모델이 그 다음 단어 20가지 생성하라고 결과는
1. Chelsea amidst a season of transition under the management of club legend frank lampard demonstrated an evolving form in the league
2. Manchester United with flashes of brilliance and frustrating dips in form in the lower ranks added an extra layer of intensity showcasing
3. Arsenal reached the final of the fa cup overcoming formidable opponents including manchester city and chelsea secure a chance to free
4. Manchester City led by the tactical genius of pep guardiola sought to defend their premier league crown with the same possession based
5. Tottenham amazon made a significant impact by broadcasting two rounds of fixtures in december featuring the highly anticipated merseyside derby occasionally
6. Best team was ensure an organized viewing experience games played on the same day were assigned separate time slots preventing overlap and ensuring
7. Against the wall season was characterized by moments of brilliance on the pitch as well as challenges that ultimately impacted city's quest for
8. The FA cup was hard but and son heung min and kane continuing to be standout contributors in attack maintained city's trademark attacking prowess led by
9. The season was filled with hardships and brighton exemplified city's dominance in disarray tournaments success in other competitions and wolverhampton while arteta southampton their modern history of
10. In the end, the best team was a mere sporting event securing eight consecutive wins 24 of which 7 were carried over from the previous season of
11. Some teams performed bad, so they were threats to opposition recognizing that klopp and ultimately brighter days lay ahead for the blues under their legendary manager that
내일은 시계열 모델 구성해 보도록 하겠습니다!
오늘은 여기까지입니다!
내일 뵐게요!