(X, how_many, remove_from_X=True)
| 109 | |
| 110 | |
| 111 | def extract_random_rows(X, how_many, remove_from_X=True): |
| 112 | split_start = np.random.randint(len(X) - how_many - 1) |
| 113 | split_end = split_start + how_many |
| 114 | rows = np.copy(X[split_start:split_end]) |
| 115 | if remove_from_X: |
| 116 | return np.vstack((X[:split_start], X[split_end:])), rows |
| 117 | return X, rows |
| 118 | |
| 119 | |
| 120 | def _load_complete_dataset(which_dataset, num_queries=10): |
no outgoing calls
no test coverage detected