alaraipek / Issues

0 stars 0 forks source link

Data Structure Writeup #15

Open alaraipek opened 2 months ago

alaraipek commented 2 months ago

Collections Updated Blog Blog Python Model code and SQLite Database.

From VSCode using SQLite3 Editor, show your unique collection/table in database, display rows and columns in the table of the SQLite database.

Lists and Dictionaries Blog Python API code and use of List and Dictionaries. 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. image

Blog Python API Code and Use of Lists and Dictionaries: In your Python API code, you likely use lists and dictionaries to manage and manipulate data. Lists are ordered collections of items, while dictionaries are unordered collections of key-value pairs. Debugger in VSCode to Display Lists and Dictionaries: Using the debugger in VSCode, you can inspect the data retrieved from a database as Python objects. This involves extracting a list of data from the database and examining it in the debugger interface. Examples of Dictionaries Using Debugger: The debugger can also be used to display examples of dictionaries. You can show two distinct dictionaries, each with its keys and corresponding values, using the debugger interface.

APIs and JSON Blog Python API code and use of Postman to request and respond with 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 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. In Postman, show the JSON response data for 200 success conditions on GET, POST, and UPDATE methods. image image image

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. image

Frontend Blog JavaScript API fetch code and formatting code to display JSON. image In Chrome inspect, show response of JSON objects from fetch of GET, POST, and UPDATE methods. image In the Chrome browser, show a demo (GET) of obtaining an Array of JSON objects that are formatted into the browsers screen. image In JavaScript code, describe fetch and method that obtained the Array of JSON objects. In JavaScript code, show code that performs iteration and formatting of data into HTML. image 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. image

In JavaScript code, show and describe code that handles success. Describe how code shows success to the user in the Chrome Browser screen. In JavaScript code, show and describe code that handles failure. Describe how the code shows failure to the user in the Chrome Browser screen. image

Optional/Extra, Algorithm Analysis In the ML projects, there is a great deal of algorithm analysis. Think about preparing data and predictions. image

  1. Show algorithms and preparation of data for analysis. This includes cleaning, encoding, and one-hot encoding. Data Cleaning: Algorithm: Use techniques like dropping missing values and removing outliers. Example: cleaned_data = original_data.dropna() Encoding Categorical Variables: Algorithm: Convert categorical variables into numerical format using techniques like one-hot encoding. Example: encoded_data = pd.get_dummies(data, columns=['categorical_column']) One-Hot Encoding: Algorithm: Convert categorical variables into binary columns representing each category. Example: encoded_data = pd.get_dummies(data, columns=['categorical_column'])

  2. Show algorithms and preparation for predictions: Feature Scaling: Algorithm: Scale numerical features to a standard range to ensure consistency. Example: from sklearn.preprocessing import StandardScaler scaler = StandardScaler() scaled_features = scaler.fit_transform(features) Model Training: Algorithm: Choose an appropriate model and train it on the prepared data. Example: from sklearn.linear_model import LinearRegression model = LinearRegression() model.fit(X_train, y_train) Making Predictions: Algorithm: Use the trained model to make predictions on new data. Example: predictions = model.predict(X_test)

  3. Discuss concepts and understanding of Linear Regression algorithms: Concept: Linear Regression models the relationship between independent variables (features) and a dependent variable (target) by fitting a linear equation to observed data. Assumptions: Linearity, Independence, Homoscedasticity. Evaluation: Metrics like Mean Squared Error, R-squared, and Root Mean Squared Error are commonly used to evaluate Linear Regression models.

  4. Discuss concepts and understanding of Decision Tree analysis algorithms: Concept: Decision Trees recursively split the dataset into subsets based on the most significant feature, creating a tree-like structure of decisions. Splitting Criteria: Criteria like Gini impurity or Information Gain are used to decide how to split the data at each node. Advantages: Easy to interpret and visualize, handle both numerical and categorical data, and require little data preprocessing. Disadvantages: Prone to overfitting and sensitive to small variations in the data. Ensemble Methods: Techniques like Random Forests and Gradient Boosted Trees are used to improve Decision Tree performance and mitigate overfitting.

AnanyaAsudani commented 2 months ago

0.94/1 Completed all the criteria and did extra credit. Good organization, screenshots are clear, and complete all the requirements and shows clear understanding of CRUD. Nice job on the ML and good understanding of data structures.