Glowing Python

5.1K posts

Glowing Python banner
Glowing Python

Glowing Python

@JustGlowing

Tweeting about Python trickeries, Data Visualization and Machine Learning. Half human data scientist, half machine.

Cambridge, UK Katılım Aralık 2010
397 Takip Edilen2.8K Takipçiler
Glowing Python
Glowing Python@JustGlowing·
MiniSom will soon have a training method accelerated with numba that provides 10x speed-up
Glowing Python tweet media
English
0
0
1
118
Glowing Python
Glowing Python@JustGlowing·
These are the parameters in case someone wants to replicate the experiment: size: 130x130 sigma: 10 learning_rate: 0.5 activation_distance: "euclidean" neighborhood_function: "gaussian" topology: "rectangular" training: train_batch_offlinenum_iteration: 100
English
0
0
0
51
Glowing Python
Glowing Python@JustGlowing·
Playing around with different training algorithms in MiniSom… and this map popped out. Fascinating to see how much the training method shapes the result!
Glowing Python tweet media
English
1
0
1
157
Glowing Python
Glowing Python@JustGlowing·
🎉 MiniSom now supports batch training with the new method train_batch_offline(). The changes are in the master branch and will soon be released. github.com/JustGlowing/mi…
English
0
0
1
59
Glowing Python
Glowing Python@JustGlowing·
In the mid 70s programming a computer meant using punch cars. It got much easier over time, so easy to the point that we have AI assistants to write code for us! Chances are, it will get even easier in the future. 🔮
English
0
0
0
91
Glowing Python
Glowing Python@JustGlowing·
Using AI to code faster is not bad, relying solely on AI to code will restrict your abilities to build meaningful things.
English
0
0
0
71
Glowing Python
Glowing Python@JustGlowing·
AI has become an essential tool for my coding but I do not consider myself a vibe coder. The reason is simple, 1) I use it build circumscribe snippets, check the logic and adapt them 2) I adapt the unit tests to make sure the code does what it's supposed to
English
0
0
0
82
Glowing Python
Glowing Python@JustGlowing·
📊 Best Python libs for data viz: Matplotlib, Seaborn, Plotly, Altair, Bokeh, Plotnine, Holoviews, Dash, PyViz. Clean plots, interactivity, dashboards — pick your vibe! 🚀
English
0
0
0
112
Glowing Python
Glowing Python@JustGlowing·
🚨PSA for #PySpark users: df.limit(n) is NOT deterministic! ⚠️ It just takes the first n rows from each partition, the final set can vary between runs unless you explicitly orderBy(). If you need consistent results: 👉 df.orderBy("some_col").limit(n) #BigData #SparkTips
English
0
0
0
116
Glowing Python
Glowing Python@JustGlowing·
Tackling class imbalance? Try imbalanced-learn (imblearn) — works seamlessly with #scikitLearn! from imblearn.over_sampling import SMOTE X_res, y_res = SMOTE().fit_resample(X, y) It also supports under/over sampling, pipelines & ensembles. ⚖️ #Python #ML #DataScience
English
0
0
0
137
Glowing Python
Glowing Python@JustGlowing·
Handling missing data in #ML? #scikitLearn gives you several imputers: SimpleImputer → mean/median/mode/constant KNNImputer → use nearest neighbors IterativeImputer → model-based (like MICE) MissingIndicator → flag NaNs Clean data = better models!
English
0
0
0
67
Glowing Python
Glowing Python@JustGlowing·
Got messy numeric data like "N/A", "—", or "??"? Use pd.to_numeric() to convert safely: pd.to_numeric(df["col"], errors="coerce") Non-numeric values become NaN — perfect for cleaning before modeling. 🧹📊 #DataCleaning #Python #ML
English
0
0
0
101
Glowing Python
Glowing Python@JustGlowing·
Since version 1.7.2, sklearn has the function brier_score_loss which measures the mean squared difference between the predicted probability and the actual outcome. #sklearn.metrics.brier_score_loss" target="_blank" rel="nofollow noopener">scikit-learn.org/stable/modules…
English
0
0
0
129
Glowing Python
Glowing Python@JustGlowing·
In PySpark, mapPartitions lets you think bigger than rows. Instead of processing one record at a time, it gives you the whole partition: rdd.mapPartitions(lambda it: [sum(it)]) Fewer function calls, faster execution. Work smarter — one partition at a time.
English
0
0
0
101
Glowing Python
Glowing Python@JustGlowing·
In Python, with is elegance in action. It handles setup and cleanup so you can focus on logic: with open("data.txt") as f: data = f.read() No need to close() — the context takes care of it. Less noise, more clarity.
English
0
0
0
105
Glowing Python
Glowing Python@JustGlowing·
Quote from "Self-Organized Formation of Topologically Correct Feature Maps", Teuvo Kohonen, 1982
English
0
0
0
89
Glowing Python
Glowing Python@JustGlowing·
"If the ability to form maps were ubiquitous in the brain, then one could easily explain its power to operate on semantic items: some areas of the brain could simply create and order specialized cells or cell groups in conformity with high-level features and their combinations"
English
1
0
0
101
Glowing Python
Glowing Python@JustGlowing·
Ever needed the Kronecker product in #Python?numpy.kron() is your friend! import numpy as np A = np.array([[1, 2], [3, 4]]) B = np.array([[0, 5], [6, 7]]) np.kron(A, B) Expand matrices in a snap!
English
0
0
0
88