Skip to content

A Delphi component designed to simplify the development of artificial intelligence solutions.

License

Notifications You must be signed in to change notification settings

fgrandini/DelphAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DelphAI

DelphAI is a Delphi component inspired by Scikit-learn, designed to simplify the development of regression, classification, recommendation, and clustering solutions.

Whether you're a beginner or an experienced Machine Learning practitioner, DelphAI makes the process simple and efficient, allowing you to focus on results rather than complex implementation.


Key Features

  • Regression: Model and predict values based on attributes.
  • Clustering: Identify patterns in your data with clustering algorithms.
  • Classification: Categorize data into distinct classes.
  • Recommendation: Build recommendation systems for items and users.
  • AISelector: Test multiple custom models at once and compare the results.
  • EasyAI: A module for beginners that automates the entire process:
    • Selects the best model for the problem.
    • Performs validation tests.
    • Saves configurations (parameters) in files for future reuse.

Full Documentation

For technical details, classes, functions, and usage examples, visit our official documentation:
📚 DelphAI - English documentation
📚 DelphAI - Documentação em português


How to Use

1. Install the component

Clone the repository and add the files to your library path or Delphi project. More details on how to do this can be found in the documentation.

2. Use EasyAI to find the best model for you (Regression example):

uses
  UEasyAI;
  
procedure TrainModel;
var
  vEasyAIClass: TEasyAIRegression;
begin
  vEasyAIClass := TEasyAIRegression.Create;
  try
    vEasyAIClass.LoadDataset('C:\DelphAI\DelphAI\Datasets\Housing Price.csv');
    vEasyAIClass.FindBestModel('C:\Example\trainedFile-Housing-price');
  finally
    vEasyAIClass.Free;
  end;
end;

3. Load the generated file to make predictions:

uses
  UEasyAI;
  
procedure ShowPredictedHousesPrice;
var
  vEasyAIClass: TEasyAIRegression;
begin
  vEasyAIClass := TEasyAIRegression.Create;
  try
    vEasyAIClass.LoadDataset('C:\DelphAI\DelphAI\Datasets\Housing Price.csv'); // Only required if alerted that the best model needs the dataset.
    vEasyAIClass.LoadFromFile('C:\Example\trainedFile-Housing-price');
    // To predict a house with the same properties the model was trained on:
    // Square_Footage = 1
    // Num_Bedrooms = 1
    // Num_Bathrooms = 1
    // Year_Built = 1964
    // Lot_Size = 3.1047807561601664
    // Garage_Size = 0
    // Neighborhood_Quality = 4
    ShowMessage('House price: ' + FormatCurr('##0.00', vEasyAIClass.Predict([2459, 1, 1, 1964, 3.1047807561601664, 0, 4])));
  finally
    vEasyAIClass.Free;
  end;
end;

Contributions

Contributions are welcome! Feel free to open issues or submit pull requests for improvements.


License

This project is licensed under the LGPL License. See the LICENSE file for more details.

About

A Delphi component designed to simplify the development of artificial intelligence solutions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages