JasonGao76 / JAIKnation_frontend

MIT License
0 stars 0 forks source link

Machine Learning Part 2 #2

Open JasonGao76 opened 6 months ago

JasonGao76 commented 6 months ago

Here, all members of our team will comment the parts we worked on for part 2 of this machine learning unit. The CPT project we used was mine last trimester, a 2D strategy game called TBFT2. The feature the ML was used in was a give the user the chance to gain or lose HP in the middle of the game to potentially increase their chances towards winning.

dino596 commented 6 months ago

Machine Learning

initTitanic() in ml.py to initialize the data. By using this function, we can simply initialize and train the data a single time and not train the data every single time we call a POST. image

This makes a new passenger data dictionary that assigns the attributes to a passenger, and can be used to call the machine learning database. image

This code then processes the passenger dictionary and outputs the chance value as a POST return. image

The utilization of the POST return can save us from using another GET request in order to get the chance from the output of the machine learning tool.

KaramKambo commented 6 months ago

MLproject post reques This is the post request that comes from the frontend and sends a request for the backend to post data. This is where the ML database is created This is where the ML database in the backend database is created and this is where the columns are defined for all of the data that is coming from the frontend. This is the property This is the property that is defining all of the variables and all of the properties are being defined. This is where the thing were defined This is where the database is initialized and created for the backend.

JasonGao76 commented 6 months ago

I'll be introducing the frontend for our project!

HTML:

JavaScript:

Ishraqh1 commented 6 months ago
Screenshot 2024-04-04 at 1 15 24 PM

This screen shot shows the code that displays when the winner is announced and presented. The function at the top helps store the meta information that gives the data on everything about the sizing in the website. The code features all of the elements that shows all the styling and the height and the featuring of the colors.

Screenshot 2024-04-04 at 1 23 52 PM

This code shows some unique features and it displays how certain buttons that we use on our frontend display can be assigned to certain actions. Thus, clicking a button here has both a title and directs to a specific link.

The overall features that show in our frontend relate to our overall project because the ML features use a lot of the input data and the variability that was involved in our Titanic, and thus allows people to input many numbers. This feature shows a strong correlation to our overall project.