Skip to content

A Binary Classification application to predict if a car price is good deal or not based on a set of attributes using FastTree trainer based on the Multiple Additive Regression Trees (MART).

Notifications You must be signed in to change notification settings

srijan-Git1247/ML.Net-Application-CarPricePrediction

Repository files navigation

The trainer used in this project uses FastTreeBinaryTrainer. Fast Tree is based on the Multiple Additive Regression Trees (MART) gradient boosting algorithm. Here, series of trees are built in a step wise manner before ultimately selecting the best tree. NuGet Package used is Microsoft.ML.FastTree

The sampledata.csv file contains 18 rows of random data. Feel free to adjust the data to fit your own observation or to adjust the trained model. Each of these rows contains the value for the properties in the CarInventory Class.

  1. HasSunroof
  2. HasAC
  3. HasAutomaticTransmission
  4. Amount
  5. Label indicating whether price is a good deal or not.

Here is a snippet of the data:

image

The testdata.csv file contains additional datga points to test the trained and evaluate:

image

Run the Console Application with commandline arguments:

  1. Train and test-evaluate the model using sampledata.csv and testdata.csv

D:\Machine Learning Projects\CarPricePrediction\bin\Debug\net8.0 train "D:\Machine Learning Projects\CarPricePrediction\Data\sampledata.csv" "D:\Machine Learning Projects\CarPricePrediction\Data\testdata.csv"

Output

Accuracy: 88.89% Area Under Curve: 100.00% Area under Precision recall Curve: 100.00% F1Score: 87.50% LogLoss: 2.19 LogLossReduction: -1.19 PositivePrecision: 1 PositiveRecall: .78 NegativePrecision: .82 NegativeRecall: 100.00%

  1. After training the model, build a sample JSON file and save it as input.json as follows: image

  2. To run the model with the input.json, simply pass in the filename to built application and the predicted out will appear:

    D:\Machine Learning Projects\CarPricePrediction\bin\Debug\net8.0\CarPricePrediction.exe predict "D:\Machine Learning Projects\CarPricePrediction\Data\input.json"

    image

About

A Binary Classification application to predict if a car price is good deal or not based on a set of attributes using FastTree trainer based on the Multiple Additive Regression Trees (MART).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages