Open DanteA-tech opened 2 months ago
1.91/2 Your write-up is very detailed and I like how you explained each step. It's very easy to follow and you've answered all the questions very well. I also like the idea of Clash Royale for your project. However, it would have been better if your write-up was in a Jekyll blog with utterance comments instead of an issue. Your formatting is also very good,
Overall, excellent job !! 👏 🔥
Background
What my main project was last try was a way to save clash royale cards to specific users using a already existing database of cards. The user can favorite the cards to their user id and is able to view them separately. For machine learning, I found it hard to try and make a project based on clash royale so me and my group members decided to make a switch over to sports with me choosing soccer.
Collections
I have two different forms of collections, with the first one being a database with all of clash royale cards and their individual information, and the second one is the user's id with the id of the unique cards that they favorited.
The code used creates the table for the favorites shown above with the columns being user id and favorited cards id.
Lists and Dictionaries
The list of the the favorited cards is extracted on the left with the different ids of the cards favorited appearing in the database.
I created two demo dictionaries with different valid Clash Royale cards in them and as you see they show up on the left
APIs and JSON
In VSCode, show Python API code definition for request and response using GET, POST, UPDATE methods. Discuss algorithmic condition used to direct request to appropriate Python method based on request method.
In this instance, the Post request occurs with the endpoint associated with the _addFavorite class. when the endpoint is hit the post methods executes the code creating a new favorite and adding it to the database. The get request is also make to the end point associated with the _favorites class. This method searches the database for favorited items based on the Users ID and the cards ID found in their seperate database.![Image](https://github.com/nighthawkcoders/teacher_portfolio/assets/142445310/657d0fc2-7e47-456f-8275-a496aeea5454)
In VSCode, show algorithmic conditions used to validate data on a POST condition.
In this case I made it so it reads the home teams in the csv file and makes sure that both of the inputted teams show up meaning they are real teams that have played at least two games giving enough info to predict a winner
In Postman, show URL request and Body requirements for GET, POST, and UPDATE methods.![image](https://github.com/DanteA-tech/student/assets/142445310/18ab4266-4be4-4540-b480-1bb115fe8db0)
This is how the post request should be structured for determining the winners between two teams.
Outputted percent chances out of 100 that each team has of winning.
Error 400 when missing team
Error 400 with duplicate teams
Both of these error 404s are prompted with the accurate error response based on the error that the user makes.
Using a user that does not exist we get a error 404 about the user not being found.
Frontend
In my code the favorites are outputted in an array with the images of each card being displayed
This fetches the API endpoint where the cards that the user favorited are stored and are then fetched then sent to the front end in order to be displayed.
In JavaScript code, show code that performs iteration and formatting of data into HTML.
The display card function iterates over the card data from the back end creating card objects within a card container allowing for the user to favorite any of the existing cards from the backend.
In the Chrome browser, show a demo (POST or UPDATE) gathering and sending input and receiving a response that show update. Repeat this demo showing both success and failure. Demonstrate favoriting a card with the backend turned on and off to show success and failure without backend.
In JavaScript code, show and describe code that handles success. Describe how code shows success to the user in the Chrome Browser screen.
This shows success with loading the cards since they would all show up onto the user's screen allowing them to favorite them.
If there is an error with favoriting the cards this code uses a catch statement that sends an alert and a console error that there was an error with favoriting the cards.
Optional/Extra, Algorithm Analysis
Show algorithms and preparation of data for analysis. This includes cleaning, encoding, and one-hot encoding.
Show algorithms and preparation for predictions.
Discuss concepts and understanding of Linear Regression algorithms. To simply explain linear regression the model is structured in a way where it looks between the X and Y variables being the predictor and the response. It attempts to draw a straight line between the points generating an equation being y= a + bx. The purpose is to optimize the equation and reduce the difference. It can be used for predicting variables based on others, predicting outcomes, determine relationships, and in my case help predict soccer games.
Discuss concepts and understanding of Decision Tree analysis algorithms. Decision tree analysis is used in data analysis that makes decisions and maps out the possible outcomes in a tree like structure. It starts at base then as more decisions happen it splits up until its basically forms leaves which act as outcomes. The algorithms goes through these splits and different paths and determine which determines the best outcome. Decision Trees are used for both classification and regression tasks and can help predict the values of target variables using potential patterns. In my code, the decision tree is trained with cleaned data where it eventually learns to predict outcomes based on past game results.