{"id":16599330,"url":"https://github.com/dmmiller612/machine_learning_spring_weka","last_synced_at":"2025-10-29T13:30:53.291Z","repository":{"id":97340460,"uuid":"51227506","full_name":"dmmiller612/Machine_Learning_Spring_Weka","owner":"dmmiller612","description":"Weka with spring example","archived":false,"fork":false,"pushed_at":"2017-09-19T18:09:24.000Z","size":6529,"stargazers_count":22,"open_issues_count":2,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-02T01:41:21.141Z","etag":null,"topics":["machine-learning","spring","weka"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmmiller612.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-02-06T23:38:59.000Z","updated_at":"2024-11-17T21:09:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"c7794968-b9fc-49ca-ad8e-0c6ad2fe44c2","html_url":"https://github.com/dmmiller612/Machine_Learning_Spring_Weka","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmmiller612%2FMachine_Learning_Spring_Weka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmmiller612%2FMachine_Learning_Spring_Weka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmmiller612%2FMachine_Learning_Spring_Weka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmmiller612%2FMachine_Learning_Spring_Weka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmmiller612","download_url":"https://codeload.github.com/dmmiller612/Machine_Learning_Spring_Weka/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238825865,"owners_count":19537144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["machine-learning","spring","weka"],"created_at":"2024-10-12T00:11:11.257Z","updated_at":"2025-10-29T13:30:52.288Z","avatar_url":"https://github.com/dmmiller612.png","language":"Java","readme":"# Machine Learning with Weka and Spring examples\n\nCode url: https://github.com/dmmiller612/Machine_Learning_Spring_Weka\n\n# Instructions\n\nIf wanting to run the server locally, instead of just using the Weka models located in /src/main/resources/models, there are a couple of dependencies needed: Maven and Java.\n\n1. This uses java 1.7, but should work with 1.8 as well. For the JRE, `sudo apt-get install default-jre` . For the jdk, `sudo apt-get install default-jdk`.\n\n2. This uses Maven 3.x . To Install maven 3, use `sudo apt-get install maven`.\n\n3. Go to the root of the assignment code repository and type: `mvn clean package` into the command line. Then type `java -jar target/derek-assignment-1-0.1.0.jar`. Once running the jar, all of optimal models will start to run against the test datasets of both the Car Evaluation and Census dataset. This is here just to make it easier to visualize, so that you do not have to use the rest api. If you want to use the rest api, see documentation below.\n\n4. IF three does not work, it is because the plugin did not properly install. Running this command should do the trick inside of the students-filters-master\n\"mvn install:install-file -Dfile=filters-0.0.1-SNAPSHOT.jar -DgroupId=filters -DartifactId=filters -Dversion=0.0.1-SNAPSHOT -Dpackaging=jar\"\n\n\n# Navigating the Source Code \n\n### src/main/java/com/derek/ml/controllers \n\ncontains the rest endpoints.\n\n### src/main/java/com/derek/ml/services \n\ncontains all of the logic and configuration of weka models. ClusterService -\u003e k-means and EM, FeatureReductionService -\u003e ICA, PCA, RP, CFS, KNNService -\u003e KNN, NeuralNetworkService -\u003e Neural Network, DecisionTreeService-\u003eDecision Trees (boosted an unboosted), SVMService-\u003eSVM\n\n### src/main/java/com/derek/ml/models \n\nDTO passing layers\n\n\n# Navigating the Resources \n\n### src/main/resources/csv \n\nContains all of the initial csv files used (Arffs are only used for the models, however)\n\n### src/main/resources/arffs \n\nContains all of the arffs used. car_train.arff and car_test.arff are the training and testing instances for the car evaluation dataset. census.arff and censusTest.arff are the training and testing instances for the Census dataset. \n\n### src/main/resources/models \n\nContains several models used for the supervised learning analysis. If you don’t want to run the code locally, you can just use these models against the training and test arffs listed above.\n\n\n# Using the Rest API (Optional)\n\nI thought I would just add this to show the code I used for experimentation with Weka. I used the api, so that I could do multiple concurrent requests.\n\nUniversal Query parameters: fileName : {Car, Census, CarBin, CensusBin}, testType : {CrossValidation, TestData, Train}\n\n# Cluster\n\nEndpoints: /kMeans and /em\nQuery Params =\u003e clusters : int, distances : {Euclidean, Manhatten}, iterations: int, featureSelection: {ICA, PCA, RP, CFS};\n\n# Feature Reduction\n\nEndpoints: /featureReduction/pca /featureReduction/ica /featureReduction/rp /featureReduction/cfs\n\n# Decision Trees\n\nEndpoint: /decisiontree\n\nQuery Params =\u003e minNumObj : int, boost : boolean, confidence : String, treeType : {ID3, J48}\n\nExample Requests:\nhttp://localhost:8080/decisiontree?fileName=Car\u0026testType=TestData\u0026minNumObj=2\u0026confidence=.25\nhttp://localhost:8080/decisiontree?fileName=Census\u0026testType=CrossValidation\u0026minNumObj=2\u0026confidence=.25\nhttp://localhost:8080/decisiontree?fileName=Car\u0026testType=CrossValidation\u0026minNumObj=2\u0026confidence=.25\u0026boost=true //with boosting\n\nUsing incremental testing example:\nhttp://localhost:8080/decisiontree/test?fileName=Car\u0026testType=TestData\u0026minNumObj=2\u0026confidence=.25\u0026boost=true\n\n# KNN\n\nEndpoint: /knn\n\nQuery Params =\u003e k : int, boost : boolean, treeTypes {BallTree, CoverTree, Linear}, useFeatureSelection : boolean (applies only to Census file)\n\nExamples : \nhttp://localhost:8080/knn?fileName=Car\u0026testType=TestData\u0026k=3\nhttp://localhost:8080/knn?fileName=Census\u0026testType=TestData\u0026k=5\u0026featureSelection=true\nhttp://localhost:8080/knn?fileName=Census\u0026testType=TestData\u0026k=5\u0026boost=true\n\nUsing incremental testing example:\nhttp://localhost:8080/knn/test?fileName=Census\u0026testType=TestData\u0026k=5\n\n# ANN\n\nEndpoint: /neuralnetwork\n\nQuery Params =\u003e hiddenLayers : int, epochRate : int, featureSelection : boolean (applies only to Census file)\n\nExamples:\nhttp://localhost:8080/neuralnetwork?fileName=Car\u0026testType=TestData\u0026hiddenLayers=10\u0026epochRate=500\nhttp://localhost:8080/neuralnetwork?fileName=Census\u0026testType=TestData\u0026hiddenLayers=5\u0026epochRate=500\u0026featureSelection=true\n\nUsing incremental testing example:\nhttp://localhost:8080/neuralnetwork/test?fileName=Car\u0026testType=TestData\u0026hiddenLayers=10\u0026epochRate=500\n\n# SVM\n\nEndpoint: /svm\n\nQuery Params =\u003e kernelType : {Polynomial, RBF, Sigmoid, Linear}\n\nExamples:\nhttp://localhost:8080/svm?fileName=Car\u0026testType=TestData\u0026kernelType=Polynomial\nhttp://localhost:8080/svm?fileName=Census\u0026testType=TestData\u0026kernelType=RBF\nhttp://localhost:8080/svm?fileName=Census\u0026testType=TestData\u0026kernelType=Sigmoid\nhttp://localhost:8080/svm?fileName=Census\u0026testType=TestData\u0026kernelType=Linear\n\n\n# MODELS\n\nThe model names contain the parameters that were used, fileName, and algorithm name.\n\nDecision Tree Naming Convention: decisionTree + minNumObj + Boosted + confidence + fileName + .model\nExample: decisionTree-minNumObj=100-Boosted=false-C=0.25-file=Census.model\n\nKNN Naming Convention: KNearestNeighbor + k + fileName + .model\nExample : KNearestNeighbor-k=20-fileName=Car.model\n\nANN Naming Convention: ANN + hiddenLayers + epochRate + FileName + (Optional) featureSelection + .model\nExample : ANN-hiddenLayers=10-epochRate=250-FileName=Census.model\n\nSVM Naming Convention: SVM + kernelType + FileName + .model\nExample : SVM-KernelType=Linear-FileName=Car.model\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmmiller612%2Fmachine_learning_spring_weka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmmiller612%2Fmachine_learning_spring_weka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmmiller612%2Fmachine_learning_spring_weka/lists"}