Pasml
A collection of machine learning algorithms for object pascal
Install / Use
/learn @ariaghora/PasmlREADME
PasML
A collection of machine learning algorithms for object pascal.
Implemented algorithms
|Category|Type|Model|Notes| |---|---|---|---| |Unsupervised|Clustering|K-Means|Only random centroid initialization. Gladly accept your contribution.| |Supervised|Classification|Decision Tree|C4.5 implementation. Continuous data handling only for now.| |Supervised|Classification|Naive Bayes|Gaussian naive bayes| |Supervised|Regression|MLP Regressor|Multi-layer perceptron regressor. Requires noe.|
Numerik compatibility
Dataset := ReadCSV('datasets/iris.csv');
X := Dataset[[_ALL_, [0, 1, 2, 3]]];
y := Dataset[[_ALL_, 4]];
Clustering example
kmeans := TKMeans.Create(3);
kmeans.Fit(X);
WriteLn('Clustering result:');
PrintMultiArray(kmeans.Predict(X));
Classification example
nb := TNaiveBayesClassifier.Create;
nb.Fit(X, y);
pred := nb.Predict(X);
WriteLn('Accuracy:');
WriteLn(Mean(pred = Ravel(y)).Item);
Integration with gnuplot
PasML has gnuplot integration support. Please ensure that you have installed gnuplot and add the executable path to the environment variable. Currently only scatter and line plots are supported.
fig := TFigure.Create('Iris Flower Features', 'Petal length', 'Petal width');
fig.AddScatterPlot(X[[_ALL_, [2, 3]]].SliceBool([y = 0]), 'Iris Setosa');
fig.AddScatterPlot(X[[_ALL_, [2, 3]]].SliceBool([y = 1]), 'Iris Virginica');
fig.AddScatterPlot(X[[_ALL_, [2, 3]]].SliceBool([y = 2]), 'Iris Versicolor');
fig.LegendPosition := lpLeftTop;
fig.Show;
fig.Free;
<img src="assets/plot_example.jpg" width=400px></img>
Note
Related Skills
YC-Killer
2.7kA library of enterprise-grade AI agents designed to democratize artificial intelligence and provide free, open-source alternatives to overvalued Y Combinator startups. If you are excited about democratizing AI access & AI agents, please star ⭐️ this repository and use the link in the readme to join our open source AI research team.
best-practices-researcher
The most comprehensive Claude Code skills registry | Web Search: https://skills-registry-web.vercel.app
groundhog
398Groundhog's primary purpose is to teach people how Cursor and all these other coding agents work under the hood. If you understand how these coding assistants work from first principles, then you can drive these tools harder (or perhaps make your own!).
isf-agent
a repo for an agent that helps researchers apply for isf funding
