<commit_before>---
published: false
---

## Clustering 
structural discovery 

### K-means

- The final clusters depend on the choosing of initial centroids
- center

- Distortion 
- work for random restart points
- does not work for choosing size ( more clusters often lead to smaller distortioin) 
- cross-validation cannot solve the problem
- **solution** penalize models with more clusters, according to how much extra fit would be expected form the additonal cluster (bayesian information criterian, AIC)

### advanced clustering algorithms


### factor analysis 

- find how data features/variables together <commit_msg>Updated 2017-01-20-big-data.md<commit_after>---
published: true
---

## Clustering 
structural discovery 

### K-means

- The final clusters depend on the choosing of initial centroids
- center

- Distortion 
- work for random restart points
- does not work for choosing size ( more clusters often lead to smaller distortioin) 
- cross-validation cannot solve the problem
- **solution** penalize models with more clusters, according to how much extra fit would be expected form the additonal cluster (bayesian information criterian, AIC)

### advanced clustering algorithms


### factor analysis 

- find how data features/variables together
{'fraction_non_alphanumeric': 0.0702446724546172, 'fraction_numerical': 0.006314127861089187, 'mean_word_length': 4.19672131147541, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7434156', 'n_tokens_mistral': 336, 'n_tokens_neox': 307, 'n_words': 153}