-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data Structures write up #10
Comments
Trevor Huang Glows:
Grows:
Overall:
|
Peer graded by Trevor Huang Collections
Lists and Dictionaries
APIs and JSON
Frontend
Algorithm Analysis
|
Collections
Lists and Dictionaries
APIs and JSON
Frontend
Algorithm Analysis
|
Show lists:































Searching:
Algorithms: Finds the accuracy of the models by iterating and testing them:
Sorting:
Queues: Uses this to match up the payload in the json file in exercise. This means that the data given should be in the correct order!
From VSCode using SQLite3 Editor, show your unique collection/table in database, display rows and columns in the table of the SQLite database:
From VSCode model, show your unique code that was created to initialize table and create test data:
This code will pull data from the JSON file and place a drink for its respective calorie count in the SQLite database.
This code creates the class and defines the columns of the table. The properties are for CRUD.
In VSCode, show Python API code definition for request and response using GET, POST, and UPDATE methods. Discuss the algorithmic condition used to direct requests to the appropriate Python method based on the request method:
In VSCode using Debugger, show a list as extracted from database as Python objects:
In VSCode use Debugger and list, show two distinct example examples of dictionaries, show Keys/Values using debugger:
This is the code that has the POST and GET commands. The code is updated by utilizing the database. When using the delete command, the drink continues to stay deleted.
In VSCode, show algorithmic conditions used to validate data on a POST condition:
In Postman, show URL request and Body requirements for GET, POST, and UPDATE methods 200:
In Postman, show the JSON response for error for 400 when missing body on a POST request:
In Postman, show the JSON response for error for 404 when providing an unknown user ID to a UPDATE request:
In Chrome inspect, show response of JSON objects from fetch of GET, POST, and UPDATE methods:
In the Chrome browser, show a demo (GET) of obtaining an Array of JSON objects that are formatted into the browsers screen:
In JavaScript code, describe fetch and method that obtained the Array of JSON objects:
To obtain the particular array of JSON objects, I used the method GET. The reason is in my API, I have an endpoint defined so that GET is called when the page refreshes. It means it doesn't need user input or a button to control the display of data. I have another GET element in my backend which gets the calories of one drink. This GET is defined differently by setting the CONST to the API url+drinkname. drinkname is given by the user and the API URL is defined properly before.
In JavaScript code, show code that performs iteration and formatting of data into HTML:
Show algorithms and preparation of data for analysis. This includes cleaning, encoding, and one-hot encoding:
Show algorithms and preparation for predictions:
Linear regression is a statistical method used to model the relationship between a dependent variable and one or more independent variables. It aims to find the best-fitting straight line (or hyperplane in higher dimensions) to predict the dependent variable based on the independent variables. The algorithm calculates the coefficients that minimize the difference between the observed and predicted values, making it suitable for tasks like predicting house prices based on features like size and location.
Decision tree analysis is a machine learning technique used for classification and regression tasks. It involves creating a tree-like model of decisions based on feature variables. The algorithm splits the data into subsets based on the value of the features, aiming to maximize the homogeneity of the resulting subsets in terms of the target variable. Decision trees are intuitive to interpret and can handle both numerical and categorical data, making them useful for various applications, from diagnosing medical conditions to predicting customer churn.
The text was updated successfully, but these errors were encountered: