전체 글

·TIL
🔗 1528. Shuffle String오늘은... 종강일...너무 피곤해서.... 비기너 문제로 했다...😶내일부터 다시 화이팅...class Solution: def restoreString(self, s: str, indices): answer_list = ["" for _ in indices] answer = "" for idx, index in enumerate(indices): answer_list[index] = s[idx] for w in answer_list: answer += w return answer
·TIL
오늘은.. 자료구조 시험이 있었고, 내일은 데이터 사이언스 시험이 오전에 있어서 싹 한번 정리했다.정렬 부분은 제대로 정리해서 아주 뿌듯, 이전에 쓴 게시물에 코드를 추가해 줬다. 2024.06.17 - [데이터 사이언스] - Getting to know Your Data & Data preprocessing Getting to know Your Data & Data preprocessingGetting to know Your DataData objects and Feature TypesNominal - {red, blue, white,... } Binary - 0, 1Ordinal - {small, medium, large}Numeric Ratio-scaledInterval-scaledBasic Sta..
Netflix PrizeRecommendation and Collaborative FilteringKNN-based MethodsMartrix FactorizationRecent RecommendersCase StudyNetflix PrizeRMSE(Root Mean Square Error)$\frac{1}{\left|R \right|}\sqrt{\sum_{(i,x)}^{}(\hat{r}_{xi}-r_{xi})^2}$넷플릭스 원래 RMSE 인 0.9514에서 10% 더 줄여라!Recommendation and Collaborative Filtering추천 알고리즘의 종류User Profile matchingContent based recommendationCollaborative filtering(usi..
What is cluster analysisCategories & Basic Concepts of ClusteringPartitioning MethodsHierarchical Methods⬇️ 여기부터Integration of Hierarchical & Distance-based ClusteringDensity Based MethodsSummaryIntegration of Hierarchical & Distance-based Clusteringhierarchical clustering 은 데이터가 커짐에 따라 너무 시간 복잡도가 커져버림, 차라리 K-means 쓰는 것이 나을 정도BIRCH(Balanced Iterative Reducing and Clustering using Hierarchies)Pha..
What is cluster analysisCategories & Basic Concepts of ClusteringPartitioning MethodsHierarchical Methods⬇️ 여기부터Integration of Hierarchical & Distance-based ClusteringDensity Based MethodsSummaryIntegration of Hierarchical & Distance-based Clusteringhierarchical clustering 은 데이터가 커짐에 따라 너무 시간 복잡도가 커져버림, 차라리 K-means 쓰는 것이 나을 정도BIRCH(Balanced Iterative Reducing and Clustering using Hierarchies)Pha..
Getting to know Your DataData objects and Feature TypesNominal - {red, blue, white,... } Binary - 0, 1Ordinal - {small, medium, large}Numeric Ratio-scaledInterval-scaledBasic Statistical Description of DataMeanMedianMean과 달리 데이터가 추가되면 다시 계산해야 함 ➡️ interpolation으로 해결Mode - 가장 자주 나타나는 valueSymmetric vs. Skewed Data - 대칭 또는 비대칭(치우쳐진) 데이터Quartiles, outliers and boxplotsIQR(Inter-quartile range)min, ..
·TIL
🔗 1282. Group the People Given the Group Size They Belong To조건을 처음에 잘못 파악해서 문제였다. groupSizes.length == n : 즉 groupSize의 길이 만큼의 사람이 0 ~ n-1 의 번호를 받아서 대기중!groupSize = [3, 3, 3, 3, 3, 1, 3] 이라고 했을 때 5번째 index 값이 1 이다. 5는 1명만 있는 그룹으로 가야한다는 뜻! 0번째 는 3이므로 0번 사람은 3명이 있는 그룹에 배정되어야 한다. 이 조건을 만족하는 한가지 경우만 출력한다. 이 문제를 해결하기 위해 array 와 dictionary를 썼다. 우선 groupSize를 순환하며 그룹 배정을 해주는 데 dictionary에 key 값은 인원수, ..
·자료구조
Search, Insert, Delete를 모두 상수시간에 하는 것이 목표다!가능할까?➡️ key 값 비교를 하지 말고 key 값으로 자리를 정하자! Hashing Methoddivsion hashing - h(k; p) : k mod p (p는 소수이고 table size와 비슷하면서 작은 숫자 주로 2의 거듭제곱)근데 2의 거듭제곱을 divisor로 사용했을 때 문제점: $2^3$로 하면 하위 3개 digit들만 영향을 받음 그럼!multiplicative hashing - $h(k; a) =  \left \lfloor (a\times k \times mod W)/(W/M)\right \rfloor$a는 보통 W에 대한 소수로 정함근데 만약에 $W=2^w$이고 $M=2^M$이면...? - right ..
yolang
프로그래밍 기록장