통계기반 예측 모델을 생성, 교체 플로우를 구현합니다. - #12
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Situation
소비 예측 탭에 AI 예측 기능을 위한 기반이 없었음.
통계 기반 예측 로직, 모델 생성/저장/교체 플로우, 인사이트 카드가 모두 미구현 상태였고
Repository/UseCase 계층도 예측 관련 인터페이스가 없었음.
Task
Action
StatisticsPredictionStrategy: 이상 지출 감지 / 요일별 지출 예고 / 미기록 패턴 탐지 / 일별·카테고리별 예측 구현AIModelModel(SwiftData): id(SP+UUID 6자), dataCount, accuracy(Float?), createdAt, isSelected 저장SwiftDataAIRepository: 모델 생성 시 과거 소비 1건 이상 필수, 기존 모델 선택 해제 후 신규 선택, isSelected 기준 정렬AIRepositoryProtocol/AIUseCaseProtocol: createModel, selectModel 추가AIViewModel: hasPrediction = currentModel != nil, sortedInsights 항상 3개(없으면 emptyDescription), createModel/selectModel 추가AIStatusCardView: 모델 생성 alert, 데이터 부족 alert, 모델 교체 sheet, 생성 완료 toastExpenseRepositoryProtocol: fetchAllExpenses() 추가Result