A simple installer for the MLX Flux Image Generator, optimized for Apple Silicon Macs.
curl -fsSL https://gist.githubusercontent.com/chilang/02482073c949f4f8e3125364a1c93073/raw/install.sh | bash| /*! (C) The Hyperaudio Project. MIT @license: en.wikipedia.org/wiki/MIT_License. */ | |
| /*! Version 2.1.4 */ | |
| 'use strict'; | |
| var caption = function () { | |
| var cap = {}; | |
| function formatSeconds(seconds) { | |
| if (typeof seconds == 'number') { | |
| //console.log("seconds = "+seconds); |
| ttest, pval = ttest_ind(local_mean_f1_scores, fed_avg_f1_scores) | |
| print("statistically significant:", pval < 0.05) | |
| print("p =", pval) |
| hyperparams = { | |
| 'n_runners': 10, | |
| 'sample_size': 5, | |
| 'rounds': 100, | |
| 'combine': 'weighted', # or 'mean' | |
| 'partition_params': { | |
| 'scheme': 'uniform' # stratified, non-iidness, noise injection etc. | |
| }, | |
| 'runner_hyperparams': { | |
| 'epochs': 1, |
| skews = {0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.99} | |
| scores = {} | |
| for skew in skews: | |
| print("eval", skew) | |
| hyperparams = { | |
| 'n_runners': 10, | |
| 'sample_size': 10, | |
| 'rounds': 1, | |
| 'combine': 'weighted', # or 'mean' | |
| 'partition_params': { |
| def compare_f1(hyperparams, rounds=1): | |
| local_mean_f1_scores = [] | |
| local_max_f1_scores = [] | |
| fed_avg_f1_scores = [] | |
| for i in range(0, rounds): | |
| fed_avg = FedAvg(**hyperparams) | |
| fed_avg.fit(X_train, y_train) | |
| preds = fed_avg.predict(X_test) | |
| fed_avg_f1_scores.append(f1_score(y_test, preds, average='weighted')) | |
| tmp = [] |