Train linear regression, logistic regression and K-means clustering in the browser and see the model plotted live.
在浏览器里直接训练线性回归、逻辑回归与 K-means 聚类,实时画出拟合直线、决策边界与聚类中心。
A machine-learning lab that trains real models in your browser: ordinary least squares for linear regression, gradient descent for logistic regression, and Lloyd's algorithm for K-means clustering. You pick the dataset and the noise level, hit train, and the model is fitted numerically on the spot — the fitted line, the decision boundary or the cluster centres are drawn on a canvas together with the metrics that matter, such as RMSE, accuracy and iteration count. There is no server call and no model download: the maths is implemented in plain JavaScript, so the whole lab works offline.
一个真正能训练模型的机器学习实验台:线性回归用最小二乘正规方程求解,逻辑回归用梯度下降拟合,K-means 用 Lloyd 算法迭代。你选数据集和噪声强度,点训练,模型当场数值拟合完成——拟合直线、决策边界或聚类中心会画到画布上,并给出真正有意义的指标:RMSE、准确率、迭代次数。全程没有服务器调用,也没有模型下载,数学部分用纯 JavaScript 实现,断网也能用。
Yes. Linear regression is solved with the normal equations, logistic regression is trained with mini-batch-free gradient descent on the cross-entropy loss, and K-means uses the standard Lloyd iterations with k-means++ style seeding. The parameters shown are the ones the algorithm actually produced.
是。线性回归用正规方程求解,逻辑回归用交叉熵损失做梯度下降,K-means 用标准 Lloyd 迭代与 k-means++ 式初始化。页面上显示的参数就是算法真实算出来的。
A different seed produces a different dataset and, for K-means, a different initialisation. Both change where the optimiser lands, which is exactly the point: it shows the sensitivity of these methods to initialisation and data noise.
不同的种子会生成不同的数据集,K-means 的初始中心也不同,因此优化落点会变——这正是实验台要展示的:这些方法对初始化与噪声都很敏感。
Yes. Upload a CSV where each row is x,y (a third column is treated as the binary label for logistic regression). The file is read with the browser FileReader API and never leaves your device.
可以。上传每行 x,y 的 CSV(第三列会被当作逻辑回归的二分类标签)。文件通过浏览器 FileReader 读取,不会上传。
No. Training happens in JavaScript on your own machine, and the uploaded CSV is read into browser memory only.
不会。训练在你本机的 JavaScript 中完成,上传的 CSV 只进入浏览器内存。
Tokenise text, extract TF-weighted keywords and compare two docu…
对中英文文本分词、去停用词、提取 TF 加权关键词,并用余弦相似度比较两段文本的…
Score the sentiment of a review or message with a bilingual posi…
用中英文正负情感词典对评论、留言打分,正确处理"不""没"等否定词,列出命中的正…
Turn text into spoken audio with the browser speech engine, adju…
调用浏览器内置语音引擎朗读文本,可调语速与音调,支持中文、英文、日文与韩文。…
Dictate with your microphone and get live transcribed text using…
用麦克风实时听写,自动转成文字,支持中英文识别,结果可一键复制。…
Build structured prompts from role, task, context and constraint…
按角色、任务、背景、约束、输出格式拼出结构化提示词,估算 token 数量与成本…
Run classic computer-vision operators on an image: Sobel edges, …
在本地对图片运行经典计算机视觉算子:Sobel 边缘检测、Otsu 自动阈值、直…