MAIkit

Machine Learning Lab机器学习实验台

Train linear regression, logistic regression and K-means clustering in the browser and see the model plotted live.

在浏览器里直接训练线性回归、逻辑回归与 K-means 聚类,实时画出拟合直线、决策边界与聚类中心。

What is Machine Learning Lab?机器学习实验台 是什么?

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 实现,断网也能用。

How to use machine learning lab如何使用 机器学习实验台

  1. Choose an algorithm: linear regression, logistic regression or K-means.
  2. Choose a dataset — two Gaussian blobs, a noisy line, or upload your own CSV with x,y columns.
  3. Tune sample count, noise level and random seed, then press Generate & train.
  4. Read the model parameters and metrics, and export the generated dataset as CSV.
  1. 选择算法:线性回归、逻辑回归或 K-means。
  2. 选择数据集——双高斯团、带噪声直线,或上传自己的 CSV(x,y 两列)。
  3. 调整样本数、噪声与随机种子,点"生成并训练"。
  4. 读取模型参数与指标,可把生成的数据集导出为 CSV。

Common uses常见用途

FAQ常见问题

Is this a real machine-learning implementation?这是真的机器学习实现吗?

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++ 式初始化。页面上显示的参数就是算法真实算出来的。

Why does accuracy change when I change the seed?为什么换个种子准确率就变了?

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 的初始中心也不同,因此优化落点会变——这正是实验台要展示的:这些方法对初始化与噪声都很敏感。

Can I use my own data?能用我自己的数据吗?

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 读取,不会上传。

Do you send my data anywhere?数据会被传到服务器吗?

No. Training happens in JavaScript on your own machine, and the uploaded CSV is read into browser memory only.

不会。训练在你本机的 JavaScript 中完成,上传的 CSV 只进入浏览器内存。

Other tools其他工具

🔬

Text Intelligence文本智能分析

Tokenise text, extract TF-weighted keywords and compare two docu…

对中英文文本分词、去停用词、提取 TF 加权关键词,并用余弦相似度比较两段文本的…

💬

Sentiment Analysis情感分析

Score the sentiment of a review or message with a bilingual posi…

用中英文正负情感词典对评论、留言打分,正确处理"不""没"等否定词,列出命中的正…

🔊

Text to Speech语音合成

Turn text into spoken audio with the browser speech engine, adju…

调用浏览器内置语音引擎朗读文本,可调语速与音调,支持中文、英文、日文与韩文。…

🎤

Speech to Text语音识别

Dictate with your microphone and get live transcribed text using…

用麦克风实时听写,自动转成文字,支持中英文识别,结果可一键复制。…

🧩

Prompt Engineer提示词工程助手

Build structured prompts from role, task, context and constraint…

按角色、任务、背景、约束、输出格式拼出结构化提示词,估算 token 数量与成本…

🖼️

AI Image OperatorsAI 图像算子

Run classic computer-vision operators on an image: Sobel edges, …

在本地对图片运行经典计算机视觉算子:Sobel 边缘检测、Otsu 自动阈值、直…

Sister sites友情链接 MonkeyDev dev tools hub工具总站 FreePDFKit PDF toolsPDF 工具集 ImageToolKit image tools图片工具集 AI 咒语库 AI prompt libraryAI 提示词库 DevTools developer toolkit开发工具箱 CalcKit finance calculators财务计算器 OfficeKit office utilities办公工具箱 DataKit data & spreadsheet tools数据与表格工具 ChartKit diagrams & charts图表与可视化 DocKit markdown & document toolsMarkdown 与文档工具