initial commit
This commit is contained in:
commit
fbd12d4a8e
320 files changed
+124298
No files matched your search
Vendored
BIN
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
#rs/class/ad300 #rs/assignment
|
||||
- - -
|
||||
I'm always interested in new technology and I have explored using many new AI tools in the last few years. I don't find most of them very helpful (image generation, video generation, music generation etc.) but I do use general LLMs like ChatGPT semi-regularly. One of the things I use tools like ChatGPT for is researching obscure topics that might be hard to find otherwise on the internet. It can often be a good starting place to get an overview of a topic that doesn't have much information available. This means that before I dive into obscure forum posts and comments I can have a general understanding of something even if there aren't any summary or general articles online. I have also relatively recently been exploring topics like Linux usage and managing home servers that often have very specific problems that likely won't easily find solutions for online. ChatGPT can often point me in the right direction and at least tell me what is going wrong so I can better find answers on the internet. I haven't actually used generative AI much for directly coding with tools such as Copilot or Cursor. I'll occasionally ask something like ChatGPT for advice when something is going wrong that I can't find any solutions to anywhere else, but I don't have much experience with the more specialized tools. With the use cases I have I have found that ChatGPT is often wrong in at least one part of its response and I always verify everything and will use it more as a starting point rather than an end. Instead of copy-pasting and using the code it gives me (which almost never works) I use it to get a more general understanding of the topic so that I can better do it myself or look online at more accurate sources. During this course I don't plan on using generative AI much, although if I am struggling with something more complex I might ask it for direction. I have many concerns with AI usage in an academic setting, mostly around others using it to replace their learning rather than enhancing it. In the end there is not much I can do about that though and I'll focus on making sure that I learn the content and understand it without having to lean on generative AI and rather using it to enhance my learning or productivity.
|
||||
@@ -0,0 +1,60 @@
|
||||
#rs/class/ad300 #rs/discussion
|
||||
- - -
|
||||
https://github.com/search?q=repo%3Arunelite%2Frunelite+comparable&type=code
|
||||
|
||||
https://github.com/runelite/runelite/blob/e25afded97ae8c4bcc8754e60511de8563060b67/runelite-api/src/main/java/net/runelite/api/Nameable.java#L30
|
||||
|
||||
https://github.com/runelite/runelite/blob/e25afded97ae8c4bcc8754e60511de8563060b67/runelite-client/src/main/java/net/runelite/client/plugins/config/PluginSearch.java#L49
|
||||
|
||||
I chose runelite, an open-source Runescape client written in Java, as my project. Here is a link: https://github.com/mojo626/AD300-ComparableInterface
|
||||
|
||||
The first use of a comparator that I found was the comparator [AlphaModelComparator](https://github.com/runelite/runelite/blob/c7ebe1f362e1cd794813afc0be848d09f01f3d16/runelite-client/src/main/java/net/runelite/client/plugins/gpu/Zone.java#L496)
|
||||
```java
|
||||
static class AlphaModelComparator implements Comparator<AlphaModel>
|
||||
{
|
||||
int zx, zz;
|
||||
int cx, cy, cz;
|
||||
|
||||
@Override
|
||||
public int compare(AlphaModel o1, AlphaModel o2)
|
||||
{
|
||||
return Integer.compare(z(o2), z(o1));
|
||||
}
|
||||
|
||||
private int z(AlphaModel m)
|
||||
{
|
||||
final int mx = (m.x + ((zx - m.zofx) << 10));
|
||||
final int mz = (m.z + ((zz - m.zofz) << 10));
|
||||
return (mx - cx) * (mx - cx) +
|
||||
(m.y - cy) * (m.y - cy) +
|
||||
(mz - cz) * (mz - cz);
|
||||
}
|
||||
}
|
||||
```
|
||||
I don't know exactly how this comparator works but it is for a plugin that shifts rendering to the GPU and I assume that this is used to sort the faces of models in game to make sure that they are being rendered in the correct order. A comparator is useful here because sorting faces based on z position to the camera is difficult, especially with things such as culling or overlapping faces, and a comparator allows easy definition of a custom sorting function.
|
||||
|
||||
The only use of comparable that I could find was the [Namable](https://github.com/runelite/runelite/blob/c7ebe1f362e1cd794813afc0be848d09f01f3d16/runelite-api/src/main/java/net/runelite/api/Nameable.java#L30) interface.
|
||||
```java
|
||||
/**
|
||||
* Represents a chat entity that has a name.
|
||||
*/
|
||||
public interface Nameable extends Comparable<Nameable>
|
||||
{
|
||||
/**
|
||||
* The name of the player.
|
||||
*
|
||||
* @return the name
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* The previous name the player had.
|
||||
*
|
||||
* @return the previous name
|
||||
*/
|
||||
String getPrevName();
|
||||
}
|
||||
```
|
||||
Since this interface represents something in chat, it is useful to define a custom sorting function. It might be helpful to sort the entities by name, but it could also be used to sort them into something like categories first and then alphabetically within them and using a comparable allows for easy changing and modularity of the sorting function.
|
||||
|
||||
Comparator seems to be more useful in this project since for many of the objects there will likely be multiple ways that they can be sorted and writing several comparators allows for this. I didn't notice any particular best practices or patterns in the use of comparators or comparables since there were not very many examples in the project that I chose. For the AlphaModelComparator class it seems strange that there are local variables that are populated in the comparator after creating it and before sorting. Maybe these variables (zx, cx etc.) could be added to the objects being compared to make the code a little more readable?
|
||||
@@ -0,0 +1,55 @@
|
||||
#rs/class/ad300 #rs/discussion
|
||||
- - -
|
||||
https://github.com/libgdx/libgdx/?tab=readme-ov-file
|
||||
|
||||
I chose libGDX, an open source cross-platform game development framework developed in Java. Here is a link: https://github.com/libgdx/libgdx/?tab=readme-ov-file
|
||||
|
||||
The first example of a generic that I chose was in the [TimSort](https://github.com/libgdx/libgdx/blob/91caf85c5701edb297495e38c356bc7ab9db1131/gdx/src/com/badlogic/gdx/utils/TimSort.java#L178) class that implements a better version of merge sort for sorting arrays in the engine. Using a generic for the type to sort helps because it allows an array with any type to be sorted and reduces the amount of code that needs to be written since a different method does not need to be written for each type.
|
||||
```java
|
||||
static <T> void sort (T[] a, Comparator<? super T> c) {
|
||||
sort(a, 0, a.length, c);
|
||||
}
|
||||
|
||||
static <T> void sort (T[] a, int lo, int hi, Comparator<? super T> c) {
|
||||
if (c == null) {
|
||||
Arrays.sort(a, lo, hi);
|
||||
return;
|
||||
}
|
||||
|
||||
...
|
||||
...
|
||||
...
|
||||
|
||||
}
|
||||
```
|
||||
Overall, the use of a generic here makes the code much more flexible and readable since there can be just one sort method that implements all of the logic for every type that needs to be sorted. There likely isn't much of a performance affect other than that less code needs to be written.
|
||||
|
||||
The second example that I chose was the [Path interface](https://github.com/libgdx/libgdx/blob/91caf85c5701edb297495e38c356bc7ab9db1131/gdx/src/com/badlogic/gdx/math/Path.java#L21). This interface defines a path of type T and functions that must be implemented for this path such as finding the derivative or value at a point.
|
||||
```java
|
||||
public interface Path<T> {
|
||||
T derivativeAt (T out, float t);
|
||||
|
||||
/** @return The value of the path at t where 0<=t<=1 */
|
||||
T valueAt (T out, float t);
|
||||
|
||||
/** @return The approximated value (between 0 and 1) on the path which is closest to the specified value. Note that the
|
||||
* implementation of this method might be optimized for speed against precision, see {@link #locate(Object)} for a more
|
||||
* precise (but more intensive) method. */
|
||||
float approximate (T v);
|
||||
|
||||
/** @return The precise location (between 0 and 1) on the path which is closest to the specified value. Note that the
|
||||
* implementation of this method might be CPU intensive, see {@link #approximate(Object)} for a faster (but less
|
||||
* precise) method. */
|
||||
float locate (T v);
|
||||
|
||||
/** @param samples The amount of divisions used to approximate length. Higher values will produce more precise results, but
|
||||
* will be more CPU intensive.
|
||||
* @return An approximated length of the spline through sampling the curve and accumulating the euclidean distances between the
|
||||
* sample points. */
|
||||
float approxLength (int samples);
|
||||
|
||||
}
|
||||
```
|
||||
Using a generic for the type of path here helps improve code flexibility in case the implementation of paths changes in the future. Maybe instead of using a Vector to define the point on a path it will instead need to use a new Point class. Instead of having to rewrite all of this code any definitions of a path can just use the Point class instead of the Vector class since Path is generic.
|
||||
|
||||
Before this week I didn't know a lot about generics in Java except for using them when defining things like an ArrayList. I had never written a generic class or method and now I feel like I better understand how generics work better in Java. In the future, I'll probably use generics when I need to write more broad helper functions like sorting algorithms. This allows it to work on any type and can help to reduce the amount of code I have to write and make it more readable to others. Generics can also be very helpful for future proofing code more since if a new class is used instead of having to change the algorithms it can just be swapped into the generic.
|
||||
@@ -0,0 +1,71 @@
|
||||
#rs/class/ad300 #rs/discussion
|
||||
- - -
|
||||
|
||||
For this discussion I looked at [Mindustry](https://github.com/Anuken/Mindustry). Mindustry is a tower defense factory building game that is open source and written in java. I mostly found examples of interfaces for parts of the code where it is helpful to have multiple different implementations of one thing for flexibility or future changes. This included world generation, goals and weapon logic.
|
||||
|
||||
One of the first examples I found was the interface [Objective](https://github.com/Anuken/Mindustry/blob/2ad41a904753a47f6fb1a7b64dbea46204ce207e/core/src/mindustry/game/Objectives.java#L141).
|
||||
```java
|
||||
/** Defines a specific objective for a game. */
|
||||
public interface Objective{
|
||||
|
||||
/** @return whether this objective is met. */
|
||||
boolean complete();
|
||||
|
||||
/** @return the string displayed when this objective is completed, in imperative form.
|
||||
* e.g. when the objective is 'complete 10 waves', this would display "complete 10 waves". */
|
||||
String display();
|
||||
|
||||
/** Build a display for this zone requirement.*/
|
||||
default void build(Table table){
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
This interface represents a generic objective in the game to ensure that they all have certain methods such as "complete" and "display." Different objectives can implement this interface to allow a variety of different objectives to be interchangeable since they are required to have the same base methods.
|
||||
|
||||
One example of a class that implements the Objective interface is the Research class.
|
||||
```java
|
||||
public static class Research implements Objective{
|
||||
public UnlockableContent content;
|
||||
|
||||
public Research(UnlockableContent content){
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
protected Research(){}
|
||||
|
||||
@Override
|
||||
public boolean complete(){
|
||||
return content.unlockedHost();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String display(){
|
||||
return Core.bundle.format("requirement.research",
|
||||
//TODO broken for multi tech nodes.
|
||||
(content.techNode == null || content.techNode.parent == null || content.techNode.parent.content.unlockedHost()) ?
|
||||
(content.emoji() + " " + content.localizedName) : "???");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return "research: " + content;
|
||||
}
|
||||
}
|
||||
```
|
||||
This implements its own logic for checking the progress and displaying the task in the game. This interface is beneficial since there are many different possible objectives and using an interface like this ensures that they all implement required methods to check their status in game and make sure that they all work together well.
|
||||
|
||||
A second example that I found was the [WorldGenerator](https://github.com/Anuken/Mindustry/blob/2ad41a904753a47f6fb1a7b64dbea46204ce207e/core/src/mindustry/maps/generators/WorldGenerator.java#L5) interface.
|
||||
```
|
||||
public interface WorldGenerator{
|
||||
void generate(Tiles tiles, WorldParams params);
|
||||
|
||||
/** Do not modify tiles here. This is only for specialized configuration. */
|
||||
default void postGenerate(Tiles tiles){}
|
||||
}
|
||||
```
|
||||
While this isn't a very complex interface, it is still important since it allows for different world generators to easily be added and interchanged. It defines a generate method with specific inputs. The [BasicGenerator](https://github.com/Anuken/Mindustry/blob/2ad41a904753a47f6fb1a7b64dbea46204ce207e/core/src/mindustry/maps/generators/BasicGenerator.java#L18) is an example of a class that implements WorldGenerator. It has the generate method as well as other methods that assist in the world generation. An interface is helpful here because a different generator could be written that implements WorldGenerator and it would be easy to interchange the BasicGenerator with the new one.
|
||||
|
||||
https://github.com/Anuken/Mindustry/blob/2ad41a904753a47f6fb1a7b64dbea46204ce207e/core/src/mindustry/type/AmmoType.java#L7
|
||||
|
||||
https://github.com/Anuken/Mindustry/blob/2ad41a904753a47f6fb1a7b64dbea46204ce207e/core/src/mindustry/maps/generators/WorldGenerator.java#L5
|
||||
@@ -0,0 +1,15 @@
|
||||
#rs/class/ad300 #rs/discussion
|
||||
- - -
|
||||
1. My name is Benjamin, but I usually go by Ben.
|
||||
2. My pronouns are he/him
|
||||
3. I have lived in Seattle for my whole life.
|
||||
4. Over the last few years I have enjoyed doing indoor bouldering. There is a climbing gym near my house and I will often go with friends as well.
|
||||
5. I hope to build my programming skills and gain a better foundation than I currently have.
|
||||
6. I recently read the book The Fragile Threads of Power by V.E. Schwab and enjoyed it. It is the first book in a second trilogy and I read the first one a while ago and didn't realize that there was a new book out.
|
||||
7. I am definitely a night owl since I don't love waking up early and usually get most of my work done in the evening.
|
||||
8. I would love to go back to Japan; I went with my family right before COVID and it was a lot of fun and I would love to spend some more time there since there is so much to explore.
|
||||
9. I haven't done it in a while but I can probably still unicycle.
|
||||
10. A bit of both, I have had both cats and dogs but I prefer dogs to cats.
|
||||
11. I am usually more of a podcast person and I like to listen to podcasts like The Daily and Hardfork.
|
||||
12. It's not very interesting but pizza is always a great option.
|
||||
13. None in particular.
|
||||
@@ -0,0 +1,3 @@
|
||||
#rs/class/ad300 #rs/discussion
|
||||
- - -
|
||||
One example that I think works pretty well is Pokémon. We can have a base Pokémon class with an "electric type Pokémon" subclass and then "Pikachu" subclass for a specific Pokémon. A base Pokémon superclass might have variables like number and name that subclasses will inherit. The "electric type Pokémon" subclass might add a "possible moves" field for electric type moves that the Pokémon can learn. The Pikachu class might then have specific height, weight, abilities, and could override functions like "make sound" or "get information." You can use the "electric type Pokémon" to reference any electric type Pokémon even though they might have different moves or abilities showing polymorphism. Each Pokémon class can also include functions for abilities and moves as well as traits like height, weight, and name for encapsulation. The base Pokémon class could have a "baseMove" abstract method that each subclass has to implement showcasing abstraction.
|
||||
@@ -0,0 +1,72 @@
|
||||
#rs/class/ad300 #rs/discussion
|
||||
- - -
|
||||
https://github.com/jpcsp/jpcsp ?
|
||||
|
||||
The Java stream api allows you to process lists of objects in a easy and functional way. Collections in Java are used for storing information in memory while streams process lists of objects in a pipeline fashion by chaining together functions and piping the result into the next one. Streams need a terminal operation at the end to do something with the data or nothing will happen as a result. Some of these terminal operations include collect to get a list, forEach to iterate through the elements and reduce to reduce the elements to a single value. To perform operations on a stream intermediate operations are used such as map to apply a given function to each element, filter to select elements and sorted to sort the stream. Streams in java are not executed until their terminal operation is invoked which is called lazy evaluation.
|
||||
|
||||
The project that I chose to look at for this assignment is [OpenRocket](https://github.com/openrocket/openrocket), which is open-source simulation software for model rockets.
|
||||
|
||||
The first example that I found of the use of the stream api was to get all of the children of a rocket component. The last example that I found of the stream api was in updating the motor state of the rockets. https://github.com/openrocket/openrocket/blob/unstable/core/src/main/java/info/openrocket/core/rocketcomponent/Rocket.java#L867
|
||||
|
||||
```java
|
||||
/**
|
||||
* Returns all descendants of the specified component.
|
||||
*
|
||||
* @param component Component to query
|
||||
* @return All descendants
|
||||
* @apiNote Returns an empty set if the component does not have children.
|
||||
*/
|
||||
private Set<RocketComponent> getDescendants(RocketComponent component) {
|
||||
Objects.requireNonNull(component);
|
||||
|
||||
var result = new LinkedHashSet<RocketComponent>();
|
||||
var queue = new ArrayDeque<>(component.getChildren());
|
||||
|
||||
while (!queue.isEmpty()) {
|
||||
var node = queue.pop();
|
||||
result.add(node);
|
||||
node.getChildren().stream().filter(c -> !result.contains(c)).forEach(queue::add);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
```
|
||||
This function takes all of the children of a specified component and then adds them to a queue. It then loops through that queue and adds each child to it as well as any children it has. It uses a stream to ensure that nodes are not added twice using the filter method. It then uses the forEach terminal method to add each node not already in the queue to the queue.
|
||||
|
||||
Another example that I found of the stream api is in a function to format flight data. https://github.com/openrocket/openrocket/blob/2719a75a0c9fdd4b84e7eda53e80706dca6f9db5/swing/src/main/java/info/openrocket/swing/gui/simulation/AerodynamicLookupDialog.java#L640
|
||||
```java
|
||||
static String formatLookupSummary(Translator translator, MachAoALookup table) {
|
||||
String columns = table.getValueColumns().stream()
|
||||
.map(name -> name.toUpperCase(Locale.ROOT))
|
||||
.collect(java.util.stream.Collectors.joining(", "));
|
||||
String machMin = formatDouble(table.getMinMach());
|
||||
String machMax = formatDouble(table.getMaxMach());
|
||||
if (table.hasAoA()) {
|
||||
String aoaMin = formatDouble(table.getMinAoA());
|
||||
String aoaMax = formatDouble(table.getMaxAoA());
|
||||
return String.format(translator.get("AerodynamicLookupDialog.summaryWithAoA"),
|
||||
machMin, machMax, aoaMin, aoaMax, columns);
|
||||
}
|
||||
return String.format(translator.get("AerodynamicLookupDialog.summaryNoAoA"),
|
||||
machMin, machMax, columns);
|
||||
}
|
||||
```
|
||||
The stream api is used here to format all of the data columns to make them all upper case and join them with commas in between. This is helpful since it is a much more concise and readable method than using a loop and concatenating strings.
|
||||
|
||||
The last example that I found of the stream api was in updating the motor state of the rockets. https://github.com/openrocket/openrocket/blob/unstable/core/src/main/java/info/openrocket/core/rocketcomponent/Rocket.java#L867
|
||||
```java
|
||||
private void updateMotorState() {
|
||||
Rocket rocket = document.getRocket();
|
||||
boolean newHasValidConfig = rocket != null &&
|
||||
rocket.getIds().stream().anyMatch(rocket::hasMotors);
|
||||
|
||||
if (newHasValidConfig == hasValidConfig) {
|
||||
return;
|
||||
}
|
||||
|
||||
hasValidConfig = newHasValidConfig;
|
||||
cardLayout.show(cardPanel, hasValidConfig ? CARD_TABLE : CARD_HELP);
|
||||
}
|
||||
```
|
||||
Stream is used here to make sure that all of the flight configs for the rocket have valid motors. The stream api is used to make this much more compact and readable and contains it to one line.
|
||||
|
||||
In this project it seems like the stream api is mostly used to make the code more concise and readable and as an alternative to loops that might take up more space. It is much easier to understand a forEach function than a loop through an array and it takes up a lot less space. In future projects I will likely use it in a similar way to make my code more understandable to others and take up less space.
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
#rs/assignment #rs/class/ad450
|
||||
- - -
|
||||
## Task 1
|
||||
```SQL
|
||||
SELECT country, "1990" + "1991" + "1992" + "1993" + "1994" AS total_volume FROM coffee_export
|
||||
ORDER BY total_volume DESC
|
||||
```
|
||||
![[Week4Task1.csv]]
|
||||
Looking at the data we can see that countries like Brazil and Columbia are some of the largest exporters of coffee between 1990 and 1994. This likely means that they have large industries and are great countries to look to for production since coffee production is more common in them.
|
||||
## Task 2
|
||||
```SQL
|
||||
SELECT RANK() OVER (ORDER BY b.total_volume DESC) AS rank, b.country, b.total_volume FROM (
|
||||
SELECT
|
||||
country,
|
||||
"1999_2000" + "2000_2001" + "2001_2002" + "2002_2003" + "2003_2004"
|
||||
AS total_volume FROM coffee_production
|
||||
) b
|
||||
LIMIT 10
|
||||
```
|
||||
![[Week4Task2.csv]]
|
||||
Alternate for task 2
|
||||
```SQL
|
||||
WITH summed_years as (
|
||||
SELECT
|
||||
country,
|
||||
"1999_2000" + "2000_2001" + "2001_2002" + "2002_2003" + "2003_2004" AS total_volume
|
||||
FROM coffee_production
|
||||
)
|
||||
|
||||
SELECT RANK() OVER (ORDER BY total_volume DESC) AS rank, country, total_volume FROM summed_years
|
||||
LIMIT 10
|
||||
```
|
||||
|
||||
There are a lot of the same countries on the top exporters list on the top producers list meaning that their coffee industries are likely largely focused on international markers rather than domestic ones. Sourcing all product from one country could be a risk since if something happened to their coffee industry or economy it would be challenging to pivot somewhere else for production.
|
||||
## Task 3
|
||||
```SQL
|
||||
WITH summed_years as (
|
||||
SELECT
|
||||
country,
|
||||
coffee_type,
|
||||
"1990_1991" + "1991_1992" + "1992_1993" + "1993_1994" AS total_volume
|
||||
FROM coffee_production
|
||||
), ranked as (
|
||||
SELECT
|
||||
DENSE_RANK() OVER (PARTITION BY coffee_type ORDER BY total_volume DESC) AS rank,
|
||||
country,
|
||||
coffee_type,
|
||||
total_volume
|
||||
FROM summed_years
|
||||
)
|
||||
|
||||
SELECT coffee_type, country, total_volume from ranked
|
||||
WHERE rank = 2
|
||||
```
|
||||
"Runner-up" countries such as these could present an opportunity since they likely still have established coffee industries but there might not be as much competition from other large companies. It could be easier to expand and grow without as much competition from other large brands.
|
||||
## Task 4
|
||||
```SQL
|
||||
WITH summed_exports as (
|
||||
SELECT
|
||||
country,
|
||||
"1995" + "1996" + "1997" + "1998" + "1999" + "2000" AS total_export
|
||||
FROM coffee_re_export --looking at countries that are re-exporting coffee rather than exporting for the first time
|
||||
), summed_imports AS (
|
||||
SELECT
|
||||
country,
|
||||
"1995" + "1996" + "1997" + "1998" + "1999" + "2000" AS total_import
|
||||
FROM coffee_import
|
||||
)
|
||||
|
||||
SELECT
|
||||
COALESCE(e.country, i.country) AS country,
|
||||
COALESCE(e.total_export, 0) AS export_vol,
|
||||
COALESCE(i.total_import, 0) AS import_vol,
|
||||
COALESCE(e.total_export, 0) + COALESCE(i.total_import, 0) as total_vol
|
||||
FROM summed_exports e
|
||||
FULL JOIN summed_imports i ON e.country = i.country
|
||||
ORDER BY total_vol DESC
|
||||
LIMIT 5
|
||||
```
|
||||
Countries such as the United States, Germany and France act as some of the world's primary "coffee clearinghouses" since they import and then re-export the largest quantities of coffee. This means that they are focusing more on processing more than production.
|
||||
## Task 5
|
||||
```SQL
|
||||
SELECT
|
||||
i.country AS importing_country,
|
||||
i.total_import AS importing_amount,
|
||||
e.country AS exporting_country,
|
||||
e.total_export AS exporting_amount
|
||||
FROM coffee_import i
|
||||
CROSS JOIN LATERAL (
|
||||
SELECT e.country, e.total_export FROM coffee_export e
|
||||
ORDER BY ABS(i.total_import - e.total_export) ASC
|
||||
LIMIT 1
|
||||
) e
|
||||
```
|
||||
With the data we have it is not possible to show the country of origin for the coffee. The closest I got was guessing based on matching similar values of imports and exports but in most cases countries will be importing from or exporting to multiple sources. Additional data in the form of percentage import or export from each country or origin of export and import would be needed to complete this request.
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
#rs/discussion #rs/class/ad450
|
||||
- - -
|
||||
"[T]heir greatest opportunity to add value is not in creating reports or presentations for
|
||||
senior executives but in innovating with customer-facing products and processes."
|
||||
|
||||
This quote stood out to me because it often seems like a lot of work with data is behind the scenes of companies and that it is mostly used for internal analytics. While this is all used to create better products for the user it doesn't seem like data science is often used to directly innovate on customer-facing products. In the cases where this does happen it seems like there can be a large impact to improve a product for the consumer with more data and analysis.
|
||||
|
||||
"There simply aren’t a lot of people with their combination of scientific
|
||||
background and computational and analytical skills."
|
||||
|
||||
This quote stood out to me since it was a little surprising that there are not enough people for this job. The article was written in 2012 though, so this field was still relatively new and there was not the amount of people in computer science and related fields that there are now. I wonder if there is still a shortage or with how many people are in computer science there is enough supply for the demand of data scientist roles.
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
#rs/discussion #rs/class/ad450
|
||||
- - -
|
||||
- **Ask Phase Reflection:**
|
||||
- Describe a time when you had to define a problem or understand stakeholder expectations in a project or study. How did you approach this task, and what challenges did you face?
|
||||
- One time that I had to define a problem and use the data analysis process was when I worked on creating an analysis tool for my high school robotics team. There is a website that publishes data about competitions and team performance and I wanted to use this data to create custom metrics about team performance and do some analysis. This project was largely for myself but I set the goal of creating a metric that could perform similarly to some of the others that exist such as offensive power rating or estimated points added.
|
||||
- **Prepare Phase Experience:**
|
||||
- Share an instance where you had to collect and prepare data for analysis. What types of data did you use, and how did you ensure its relevance and objectivity?
|
||||
- The data that I used came from thebluealliance.com which is a site that publishes all match data from First Robotics competitions. This data is published directly from competitions and is the primary source of match data for teams and districts. While it can be inaccurate sometimes the inaccuracies come from how the matches were scored at events and not the data entered into the system and the website will always reflect match results.
|
||||
- **Process Phase Challenges:**
|
||||
- Reflect on a situation where you had to clean or process data. What difficulties did you encounter, and how did you overcome them?
|
||||
- I pulled the data from an api so it was pretty well structured. The processing that I had to do on the data was largely ensuring that I was pulling from the correct matches and events rather than having to clean the data.
|
||||
- **Analyze Phase Insights:**
|
||||
- Discuss your experience with analyzing data. What tools or methods did you use, and how did you interpret the results?
|
||||
- One of the things that I did to analyze the data was to try and calculate a strength of schedule metric for teams at an event based on who they faced in their qualification matches. I did this by looking at how strong the teams that they were facing were and used data from after the event like match scores to give a metric of how challenging their schedule was. This wasn't the most helpful since it could only be used after an event but in the future I might expand it to predict the strength of a schedule before the matches have happened.
|
||||
- **Share Phase Application:**
|
||||
- Recall a time when you had to present your data findings. How did you communicate your insights, and what techniques did you use to make your presentation effective?
|
||||
- I didn't present much of my findings since I didn't get to a point where I was finished but if I did I would likely give examples and show some manual verification to communicate accuracy. I would also probably go through my methods for calculating the metric to show others what I was doing and how I was getting the numbers I was getting.
|
||||
- **Act Phase Impact:**
|
||||
- Think about an occasion where your data analysis led to actionable insights. What were the outcomes, and how did your analysis influence decision-making?
|
||||
- I didn't apply my findings much but the data could lead to better strategy decisions at or after competitions since you can look at the strength of the schedule of other teams at the event and determine if they might be ranked higher than they should be or lower than they should be. This is important in the review phase for an event or when making decisions of what teams to pick at the event.
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
#rs/discussion #rs/class/ad450
|
||||
- - -
|
||||
- **Planning Stage:**
|
||||
- If I was planning a survey for a school project I would consider what I was looking for and what data I wanted to gather. Once I define the goal of the project I can start thinking about what questions I might want to ask or what pieces of data to gather. Having a clear idea of the goal of the survey is important to ensure that all the needed data is gathered.
|
||||
- **Capturing Data:**
|
||||
- One of the sources of data that I would likely use the most is surveys since you can get qualitative and quantitative data from them and they are pretty easy to use to gather information. There can be many biases with this approach though so other sources based on the project would be useful as well. This could include the usage or activity of a certain service.
|
||||
- **Managing Data:**
|
||||
- I have a place to organize notes and writing for all of my classes and other projects and I have faced a few challenges in organizing it. One of these is the many different topics of my writing and currently I have everything organized into folders and subfolders based on the topic and subtopics that it relates to. This makes it easier to find information although other approaches like including tags could be useful in the future as well.
|
||||
- **Analyzing Data:**
|
||||
- One time where I had to analyze information to make a decision was when I was building my new computer. When doing this I went through many different sources including articles, videos, guides, and benchmarking sites in order to find the best parts for me. I created lists and compared the features, draw backs and pricing of many different components in order to find the best options and make a data-driven decision.
|
||||
- **Archiving Data:**
|
||||
- Every once in a while I will go through my phone and take photos off to free up space. I will often decide what to keep on my phone based on what I think I will want locally and how much space it is taking up. I will then move the photos and videos that I don't want to keep on my phone to a larger storage drive that I can still access although not quite as easily. This allows me to keep older photos while still keeping the number locally on my phone low.
|
||||
- **Destroying Data:**
|
||||
- I'm sure that there are many protocols for the deletion of sensitive information to ensure that it is not able to be recovered and I would make sure to follow the policy and procedure of where the information came from or where I might work.
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
#rs/class/ad450 #rs/discussion
|
||||
- - -
|
||||
### Description
|
||||
For another one of my classes I recently completed a project where I had to analyze a dataset including cleaning the data before using it with machine learning models to predict one of the features. The dataset that I chose to work with was a collection of data from individual laps of Formula 1 races over the last 4 years. This was a very large dataset with over 100k instances and there were several things that I had do do to preprocess and clean the data.
|
||||
### Challenges
|
||||
- **Missing Values:** One of the features in the dataset had some instances with missing values. There were 66 of the rows of the feature describing the tire compound used by the team that were missing values. Without doing something to remove the missing data later steps in the process would fail since they don't have ways to deal with null values.
|
||||
- **Outliers:** A few of the features in the dataset (especially the LapTime feature) had some extreme outliers. Most of the values of the LapTime feature were between 0 and 200 seconds while there were a few that were over 2000 seconds. This could cause models later on to be biased and metrics such as average could also not properly represent the data.
|
||||
- **Redundant Features:** There were some features that were redundant and contained effectively the same data in the dataset. One of these was RaceProgress and LapNumber which are highly correlated and contain the same information in slightly different forms. This introduces duplicate data that could harm model performance later.
|
||||
### Strategies Used
|
||||
- **Missing Values:** Since there were only 66 missing values for the Compound feature I decided to drop the rows with the missing values. With over 100k rows 66 is a very small percentage of the data and dropping the rows is easier than imputing the data. This was effective since I didn't lose much of the data and didn't introduce the possible inaccuracy of imputation.
|
||||
- **Outliers:** To remove the outliers from the dataset I created a function that looked for values outside of a +/- 3 standard deviation range. This range contains 99.7% of the data so it will only remove values that are very extreme and biasing the data. This removed the outliers and made the data much more consistent. This was mostly effective but one of the features that I used the function on removed almost 1k instances. I decided to keep this but that probably means that the data was more spread rather than having outliers.
|
||||
- **Redundant Features:** For the redundant features I decided to remove one of them to get rid of the duplicate data. For RaceProgress and LapNumber I removed the LapNumber feature since RaceProgress was more granular and was there for likely more accurate. This was pretty effective although I could have performed some more analysis to better decide which feature was better to keep.
|
||||
### Reflections
|
||||
Overall I learned a lot about data cleaning with this project and this was one of the first times that I went through the full data pipeline. I especially learned about different considerations you need to keep in mind when preprocessing data for machine learning pipelines such as looking for outliers and removing or imputing missing data. In the future I don't think I would approach data cleaning very differently but I do think I have a better understanding and will likely be able to go more in depth in the future.
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
#rs/discussion #rs/class/ad450
|
||||
- - -
|
||||
- **Role and Impact in Business**
|
||||
- Discuss the contribution of data engineers to the success of a business. How do they enable data-driven decision-making?
|
||||
- Data engineers contribute to the success of a business by giving access to important data about what is happening. Without data about what users want, their activity, and the success of the product it is very challenging for a business to grow, improve and create better products for its customers. Providing data allows for making decisions that align with what is happening and not just based on what seems correct or what some people think might be best. It can also help to measure success quantitatively to ensure that something is succeeding or to figure out when it is not.
|
||||
- **Essential Skills and Tools**
|
||||
- Identify and explain the most crucial skills for a data engineer. Why are these skills important, especially in the context of big data technologies and ETL processes?
|
||||
- Some of the most crucial skills for data engineers are being able to use languages such as Python, R and SQL as well as understanding different pipelines, databases and storage schemes. Being able to work with different programming languages is important because it unlocks many powerful tools for quickly and efficiently collecting, cleaning, and organizing data. Understanding different pipelines and schemes is also important so that data scientists are able to use what is best for the company they work at.
|
||||
- **Data Engineers vs. Data Scientists**
|
||||
- Compare and contrast the roles of data engineers and data scientists within a data analytics team. How do these roles complement each other?
|
||||
- Data engineers focus more on gathering data and ensuring it is ready for analysis and able to be gathered and analyzed. Data scientists focus on analyzing the data and looking for patterns significance and future trends. These two roles compliment each other by providing the two large steps of the process that are collecting and processing the data and analyzing it for use.
|
||||
- **Industry-Specific Challenges**
|
||||
- Examine the unique challenges data engineers might face in industries like healthcare, retail, and financial services. How do these challenges impact their work?
|
||||
- Industries such as these are more data intensive and require the processing and analysis for large quantities of data. In order to effectively operate companies in these industries must use data to impact their decision making so that they can make the best decisions to be the most profitable that they can be. The large quantities of data needed can make the job of data scientist more challenging since larger datasets can be more unwieldy and require more time for cleaning and preparing the data.
|
||||
- **Evolution of the Field**
|
||||
- Analyze how the field of data engineering has evolved and predict future trends. Consider the impact of emerging technologies and data volume growth.
|
||||
- The field of data engineering has become much more important for companies since using data to analyze trends and consumer behavior is vital for companies to stay competitive. Because of this data engineering has become a much more sought after position and as the role has also expanded to meet demands it has also split into many different more specialized roles. Along with more course and education around these topics the role has expanded and specialized to provide companies with the data they need. In the future this role will likely continue to expand, especially with companies continuing to collect more data on consumers and try to predict their behavior more.
|
||||
- **Career Pathways**
|
||||
- Discuss the educational and experiential pathways beneficial for aspiring data engineers. Assess the value of certifications, degrees, and hands-on learning.
|
||||
- There are several things beneficial for aspiring data engineers such as university degrees, projects and certifications. University degrees can include those in applied mathematics and computer science. Projects can also useful to build a portfolio and show potential employers what you can do and what you have worked on. Certificates can also be useful to show employers specific skill sets that you have learned and are proficient in. All of these options can be helpful to improve your skills and be more competitive in the job market.
|
||||
- **Ethical Considerations**
|
||||
- Explore the ethical considerations in data engineering, focusing on data privacy and security. How should data engineers approach these issues responsibly?
|
||||
- Privacy and security are important considerations for data engineers especially as more and more data is harvested from users by large companies. There likely isn't much data engineers can do at most companies since they are likely not the ones making the decisions about what data to use and record but ensuring that they follow the terms of service or privacy policy is important. Securely storing private information is also vital so that it is not leaked unintentionally.
|
||||
- **Real-World Applications**
|
||||
- Provide examples or case studies where data engineering played a critical role. Discuss the solutions implemented and their effectiveness.
|
||||
- One example that was discussed in one of the articles was about LinkedIn. Near the start the platform would just let users find others and create connections on their own. Someone had the idea for the platform to suggest others to users to increase the number of connections that they would make and used data on the platform to suggest users. These suggestions massively increased engagements and connection on the platform since it exposed users to others that they might not have connected with using data engineering and analysis.
|
||||
- **Collaboration with IT Professionals**
|
||||
- Describe how data engineers collaborate with other IT professionals. Highlight the importance of teamwork and communication in successful data projects.
|
||||
- Data engineering is not the only aspect of most projects and people to help with networking, UI design, backend development and more are necessary for projects to succeed. Communication is important to ensure that all of these different aspects work together and form one cohesive product or system.
|
||||
- **Future in AI and Machine Learning**
|
||||
- Discuss the evolving role of data engineers in the context of AI and machine learning. How must data engineers adapt to these technological changes?
|
||||
- Data engineers are necessary in the development of AI and machine learning systems since large amounts of data are required for them to be developed and function. These systems can also provide new tools for analyzing and organizing data and help to make the work of data engineers more efficient. Learning to effectively use these new tools is important to stay competitive and successful as a data engineer.
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
#rs/discussion #rs/class/ad450
|
||||
- - -
|
||||
"A decade later, the job is more in demand than ever with employers and recruiters."
|
||||
|
||||
After the last article I was wondering if the supply for data scientists had now risen to meet or surpass the demand and it seems like this is not the case. I expected that the amount of new people going into computer science careers would have increased the number of data scientists. Maybe the role of data scientist is still something that is not very known about so most people just try to become software engineers instead.
|
||||
|
||||
"Now, however, there has been a proliferation of related jobs to handle many of those tasks, including machine learning engineer, data engineer, AI specialist, analytics and AI translators, and data oriented product managers."
|
||||
|
||||
This quote stood out to me since it was interesting how much the role has split up in the last ten years. It makes sense that as the role of data scientist has expanded and become more important it has split up into many different roles to increase productivity but I didn't realize how many. This could also be a reason for the demand since there are many more job titles and positions that are required at large companies.
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
#rs/notes #rs/class/csb320
|
||||
- - -
|
||||
|
||||
> [!NOTE]- Bullet Notes
|
||||
> - Classification models
|
||||
> - supervised
|
||||
> - classify instances into class (category)
|
||||
> - can predict class directly or probabilities
|
||||
> - Each column in data table is feature
|
||||
> - Each row is sample/tuple/instance
|
||||
> - K-Nearest neighbors
|
||||
> - lazy learner
|
||||
> - memorizes data, doesn't create model during training
|
||||
> - if k=6 it looks at 6 closes neighbors in dataset
|
||||
> - predicts based on what these are classified as
|
||||
> - there can be very different predictions based on k
|
||||
> - gets very expensive as the dataset grows
|
||||
> - selecting value of k
|
||||
> - k is a hyperparameter (user set value )
|
||||
> - typical values of 3-15
|
||||
> - lower value can be sensitive to noise
|
||||
> - higher value risks underfitting
|
||||
> - distance measures
|
||||
> - euclidean distance
|
||||
> - good when data is compact and continuous
|
||||
> - manhattan distance
|
||||
> - sum of absolute differences in coordinates
|
||||
> - good when data is discrete or with large distances
|
||||
> - Minkowski distance
|
||||
> - includes euclidean and manhattan
|
||||
> - parameter allows to interpolate between the two
|
||||
> - can be used for model tuning since distance function can be changed between euclidean and manhattan
|
||||
> - features should be standardized to ensure fair distance measures
|
||||
> - Logistic regression
|
||||
> - log-odds: natural log of the probability ratio
|
||||
> - uses a logistic regression to predict the chances of something being categorized in certain way
|
||||
> - logistic regression $$\hat{p}=\frac{\exp(w_0 + w_1x_i)}{1 + \exp(w_{0} + w_{1}x_{i})}$$
|
||||
> - output of logistic regression is compared to threshold T
|
||||
> - default T = 0.5
|
||||
> - linear regression will underfit for classifying data, logistic regression is better
|
||||
> - multiple input features: $$\hat{p}= \frac{\exp(w_{0} + w_{1}x_{1i}+\dots+w_{p}x_{p i})}{1+\exp(w_{0} + w_{1}x_{1i}+\dots+w_{p}x_{p i})}$$
|
||||
> - Gaussian Naive Bayes
|
||||
> - normal distributions for each outcome
|
||||
> - Baye's rule: $$P(A|B) = \frac{P(B|A) * P(A)}{P(B)}$$
|
||||
> - $P(A|B$): Posterior probability
|
||||
> - Assumptions
|
||||
> - all input features are independent
|
||||
> - all input features contribute equally to classification
|
||||
> - requires that each probability is 0
|
||||
> - if there is one option that is 0, can add 1 to each to ensure it works
|
||||
> - Linear Discriminant Analysis
|
||||
> - supervised
|
||||
> - dimensional reduction
|
||||
> - maximize the distance between groups
|
||||
> - within-class variance is minimized
|
||||
> - maximize the distances between the means of the two categories on the new axis
|
||||
> - trying to maximize: $$\frac{(\mu_{1}-\mu_{2})^2}{s_{1}^2-s_{2}^2}$$
|
||||
> - Top of equation is the distance between the averages of the data projected onto the new line
|
||||
> - bottom is minimizing the scatter within each category
|
||||
> - discriminant analysis determines decision boundary between classes
|
||||
# Classification Models
|
||||
Classification models are meant to categorize instances into new classes based on data and training. They can be supervised (using labeled data) and unsupervised (using unlabeled data). They can also either predict classes directly or the probabilities of belonging to certain classes.
|
||||
### Dataset Terminology
|
||||
|
||||
| | Feature | Feature | Feature |
|
||||
| -------- | ------- | ------- | ------- |
|
||||
| Sample | | | |
|
||||
| Tuple | | | |
|
||||
| Instance | | | |
|
||||
## Models
|
||||
### K Nearest Neighbors
|
||||
|
||||
Attributes
|
||||
- Lazy learner (memorizes data, doesn't create model during training)
|
||||
- Gets very expensive as the dataset grows
|
||||
- Requires normalization since it is based on distance measures
|
||||
|
||||
Prediction process
|
||||
![[KNN.excalidraw]]
|
||||
A KNN model selects the k closest points in the dataset and then predicts based on the most common class in this set. Ties are often broken by the class of the closest point.
|
||||
|
||||
Several different distance metrics can be used:
|
||||
![[DistanceMetrics.excalidraw]]
|
||||
- Euclidean Distance
|
||||
- Good for when data is compact and continuous $$d(x,y) = (\sum_{i=1}^n {|x_{i} - y_{i}|}^2)^{ \frac{1}{2} }$$
|
||||
- Manhattan Distance
|
||||
- Good for when data is discrete or has large distances $$d(x,y) = \sum_{i=1}^n |x_{i} - y_{i}|$$
|
||||
- Minkowski Distance
|
||||
- Allows for interpolation between Euclidean and Manhattan distance $$d(x,y) = (\sum_{i=1}^n {|x_{i} - y_{i}|}^p)^{ \frac{1}{p} }$$
|
||||
- if p = 1 it is the same as Manhattan distance
|
||||
- if p = 2 it is the same as Euclidean distance
|
||||
### Logistic Regression
|
||||
|
||||
A logistic regression is used to predict the probability of an instance belonging to a certain class. Linear regressions will often underfit data so a logistic regression can be a better choice.
|
||||
![[LogisticVsLinear.excalidraw]]
|
||||
|
||||
The equation for a logistic regression is:
|
||||
$$\hat{p}=\frac{\exp(w_0 + w_1x_i)}{1 + \exp(w_{0} + w_{1}x_{i})}$$
|
||||
|
||||
The output of this regression is compared to the threshold, T. This is usually set to 0.5 but can be changed to bias towards one class.
|
||||
|
||||
Logistic regressions can also be used with multiple input features rather than just one with the equation:
|
||||
$$\hat{p}= \frac{\exp(w_{0} + w_{1}x_{1i}+\dots+w_{p}x_{p i})}{1+\exp(w_{0} + w_{1}x_{1i}+\dots+w_{p}x_{p i})}$$
|
||||
### Gaussian Naive Bayes
|
||||
|
||||
A Gaussian NB model assumes that classes follow a Gaussian distribution and uses that to calculate the probability an instance will belong to each class.
|
||||
$$P(x_{i}|y) = \frac{1}{\sigma \sqrt{ 2\pi }}e^{-\frac{(x-\mu)^2}{2\sigma^2}}$$
|
||||
$x_{i}$ is the feature value
|
||||
$\mu$ is the mean of the feature values for a given class $y_{k}$
|
||||
$\sigma$ is the standard deviation of the feature values for the class
|
||||
|
||||
It also uses Bayes rule to calculate posterior probabilities:
|
||||
$$P(A|B) = \frac{P(B|A) * P(A)}{P(B)}$$
|
||||
The posterior probability ( $P(A|B)$ ) is the probability that $A$ happens given that $B$ has happened
|
||||
|
||||
The algorithm is referred to as "naive" because it makes a few assumptions:
|
||||
- There is no correlation between the features in the dataset, they are all independent
|
||||
- Each feature has an equal importance when predicting the output class
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
#rs/notes #rs/class/csb320
|
||||
- - -
|
||||
- loss functions
|
||||
- quantifies differences between predictions and observed values
|
||||
- should minimize loss
|
||||
- absolute loss
|
||||
- prediction of instance
|
||||
- log loss
|
||||
- penalizes wrong predictions more harshly when they are more confident $$L_{\log}(y_{i}, \hat{p}_{i}) = -(y_{i}\ln(\hat{p}_{i}) + (1-y_{i})\ln(1-\hat{p}_{i}))$$
|
||||
- cross-entropy loss
|
||||
- used for multi-class classification
|
||||
- measures difference between observed and predicted distributions
|
||||
- type I error: false positive
|
||||
- type II error: false negative
|
||||
- evaluation metrics
|
||||
- accuracy $$\frac{\text{num correct predictions}}{\text{num incorrect predictions}}$$
|
||||
- precision $$\frac{TP}{TP + FP}$$
|
||||
- F-measures
|
||||
- harmonic mean of precision and recall
|
||||
- beta allows for emphasizing precision or recall in metric: $$F_{\beta} = (1 + \beta^2)\frac{{\text{precision} * \text{recall}}}{\beta^2 * \text{precision} + \text{recall}}$$
|
||||
- $\beta>1$ emphasizes recall
|
||||
- $\beta<1$ emphasizes precision
|
||||
- kappa
|
||||
- overall proportion of correct predictions
|
||||
- evaluates performance when compared to random classifier
|
||||
- 1: perfect classifier
|
||||
- 0: same accuracy as random chance
|
||||
- <0: worse than random chance
|
||||
- accuracy fails for imbalanced datasets
|
||||
- ex. when most people don't have cancer
|
||||
- AUC-ROC curve
|
||||
- Receiver operating curve
|
||||
- AUC represents the degree of seperability
|
||||
- ROC curves
|
||||
- shows the trade off between true positive rate and false positive rate
|
||||
- ![[rocCurve.excalidraw]]
|
||||
- parametric graphs, false positive rate is on the x-axis and true positive rate is on the y-axis
|
||||
- parameter is threshold for positive classification
|
||||
- when threshold is raised there are less false positives but also less true positives
|
||||
- vice versa
|
||||
- area underneath the curve is a measure of the accuracy
|
||||
- AUC (Area under the curve)
|
||||
- When to use metrics
|
||||
- accuracy is very bad when dataset is not balanced
|
||||
- precision vs. recall
|
||||
- depends on the situation (don't want to have false negatives for cancer)
|
||||
- F1 can maximize precision and recall and gives balance
|
||||
- when balanced classes, maximize accuracy
|
||||
- unbalanced classes can prioritize F1 on only one class if one is more important
|
||||
- Holdout method
|
||||
- data is randomly partitioned into two independent sets
|
||||
- validation set (often half of testing set) is used to decide optimal hyperparameter values
|
||||
- Random subsampling
|
||||
- holdout is repeated k times and accuracy is average
|
||||
- Cross validation
|
||||
- separate into sections, iterate through and use different section as the test set each time
|
||||
- average the error
|
||||
- if the average accuracy goes down with cross validation compared to holdout then model is likely overfitting
|
||||
- stratified cross-validaiton
|
||||
- ensure that the distribution of data is the same in each section as in the general data set
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
#rs/notes #rs/class/csb320
|
||||
- - -
|
||||
- Data cleaning
|
||||
- incomplete
|
||||
- noisy (negative, wrong)
|
||||
- inconsistent
|
||||
- incorrect age vs. birthday
|
||||
- intentional
|
||||
- ex. not actually adding values, same for everything
|
||||
- Missing data
|
||||
- missing completely at random
|
||||
- missing data completely at random
|
||||
- missing at random
|
||||
- missing based on variables but not missing values
|
||||
- ex. no garage space data in specific location
|
||||
- missing not at random
|
||||
- missing due to unobserved factors or systematic reasons
|
||||
- handling missing values
|
||||
- constant value
|
||||
- attribute mean
|
||||
- most probable value
|
||||
- can use regression models to predict missing features
|
||||
- KNN imputation
|
||||
- estimates based on k most similar instances
|
||||
- handling noisy data
|
||||
- smooth data by partitioning into bins
|
||||
- smooth data by fitting into regression
|
||||
- clustering to detect and remove outliers
|
||||
- pairwise deletion: only delete missing/incorrect values
|
||||
- listwise deletion: delete entire row if missing value
|
||||
- some features need to be removed
|
||||
- duplicates
|
||||
- high proportion of missing values
|
||||
- all same
|
||||
- no pattern
|
||||
- Feature transformation
|
||||
- continuous -> discrete (simplification)
|
||||
- reduce data noise
|
||||
- decision trees can perform better with discrete data
|
||||
- equal frequency or equal interval binning
|
||||
- normalization
|
||||
- scales data to range between 0 and 1
|
||||
- standardization
|
||||
- scales to have a mean of 0 and standard deviation of 1
|
||||
- encoding categorical features
|
||||
- binary encoding
|
||||
- categories as binary vectors (00, 01, 10)
|
||||
- label encoding
|
||||
- unique integers for each category (1, 2, 3)
|
||||
- one-hot encoding
|
||||
- convert categories into binary vectors
|
||||
- decision trees and random forests care about data split so they work better with label or binary encoding
|
||||
- logistic or linear regression work better with one-hot encoding since they care about distance between data points
|
||||
- imbalanced data
|
||||
- evaluation metrics
|
||||
- different ones work better with imbalanced data
|
||||
- data-level methods
|
||||
- undersampling
|
||||
- reduce majority class to balance
|
||||
- the minority class needs to be large enough to still have enough data
|
||||
- random undersampling
|
||||
- Tomek links
|
||||
- pair from majority and minority class, are each others closest neighbors
|
||||
- removing pairs can help to create clearer separation between classes
|
||||
- can make decision boundary more clear
|
||||
- oversampling
|
||||
- increase minority class through SMOTE
|
||||
- ![[SMOTE.excalidraw]]
|
||||
- synthetic minority oversampling technique
|
||||
- increases size of minority and variety
|
||||
- find k nearest minority neighbors, select j of them
|
||||
- add new synthetic data along line between these data points
|
||||
- can overgeneralize data
|
||||
- algorithm-level methods
|
||||
- can weight classes differently
|
||||
- assigns misclassification costs
|
||||
- algorithm selection (random forest and adaboost handle imbalanced data better)
|
||||
- threshold adjustment
|
||||
- dimensionality
|
||||
- too many features creates sparse data
|
||||
- can cause overfitting
|
||||
- distance becomes less meaningful
|
||||
- reduction
|
||||
- simplifies representation, improves performance
|
||||
- can preserve essential information
|
||||
- feature selection
|
||||
- ranked with statistical tests
|
||||
- iterative model building and testing
|
||||
- linear -> straight line
|
||||
- monotonic -> moving in same direction
|
||||
- want a linear/monotonic relationship between target class and each feature
|
||||
- do not want linear/monotonic relationship between feature classes
|
||||
- different metrics depending on if inputs/outputs are numerical or categorical
|
||||
- PCA (principle component analysis)
|
||||
- creates new uncorrelated features (principle components)
|
||||
- maintains the maximum amount of variance in the data
|
||||
-
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
- Natural language processing
|
||||
- concerned with the interactions between computers and human languages
|
||||
- identify the structure and meaning of words, sentences and text
|
||||
- Applications
|
||||
- sentiment analysis
|
||||
- text summarization
|
||||
- named entity recognition
|
||||
- data can be structured or unstructured (posts/reviews or address and date formats)
|
||||
- Regular expressions
|
||||
- text strings that are used to find patterns in text
|
||||
- [Pythex](https://pythex.org) is very helpful for testing regex
|
||||
- regex can be used to prepare data for models
|
||||
- remove punctuation and replace with spaces
|
||||
- remove numbers
|
||||
- remove any extra spaces
|
||||
- can also convert to lowercase if you are not trying to find named entities
|
||||
- if not trying to find named entities should convert all to lower case so ex. October = october
|
||||
- tokenization is converting a string to a list of words
|
||||
- each token is evaluated separately
|
||||
- some words are not helpful and should be removed ("a", "the", "in" etc.)
|
||||
- stemming
|
||||
- converting words into their most root version
|
||||
- running -> run
|
||||
- desperately -> desper
|
||||
- studies -> studi
|
||||
- words in sentence and roots have essentially the same meaning
|
||||
- lemmatization
|
||||
- ensures that stem version of the word is a real word
|
||||
- desperately -> desper -> desperate
|
||||
- bag of words representation
|
||||
- tokenization -> map words to indexes -> count word occurrences per document.
|
||||
- first tokenize sentence
|
||||
- then build vocabulary overall documents in corpus by tokenizing them
|
||||
- each phrase transformed into vector based on each words frequency in that phrase
|
||||
- vector dimensions is size of vocabulary
|
||||
- creates sparse matrix
|
||||
- can use this to categorize phrases by meaning, compare similarity or sentiment
|
||||
- cosine similarity matrix
|
||||
- can be used to compare similarity of phrases
|
||||
- 1.0 means that it is the same phrase
|
||||
- Term Frequency - Inverse Document Frequency
|
||||
- weights words based on importance across documents
|
||||
- high weight to word that appears often in one document but not in many documents in the corpus
|
||||
- avoids words like "the" and "in"
|
||||
- words like these are likely to be very descriptive of the contents of the document
|
||||
- $$tfidf(w,d) = tf * \log\left( \frac{N+1}{N_{w} + 1} \right) + 1$$
|
||||
- $N_{w}$: number of documents in training set that word $w$ appears in
|
||||
- $N$: number of documents in training set
|
||||
- $tf$ (term frequency): number of times that the word $w$ appears in the query document $d$
|
||||
- $tf(w, d) = \frac{{\text{number of w in d}}}{\text{total words in d}}$
|
||||
- importance of word in specific document in comparison to the entire corpus
|
||||
- N-grams
|
||||
- splitting sentences into groups of n words instead of individual words when tokenizing
|
||||
- can help to analyze relationships between words
|
||||
- Topic modeling
|
||||
- unsupervised learning to group them into topics
|
||||
- Latent Dirichlet Allocation (LDA) is a popular technique
|
||||
- Logistic regression, Naive Bayes and SVMs can be used for text classification
|
||||
- deep learning is best way to do this
|
||||
- Word embeddings
|
||||
- vector representations of words
|
||||
- captures meaning, relationships to other words and context in a continuous vector space
|
||||
- ex. king - man + woman = queen
|
||||
- models can dynamically create vector embeddings based on context for words with different meanings
|
||||
-
|
||||
@@ -0,0 +1,44 @@
|
||||
#rs/notes #rs/class/csb320
|
||||
- - -
|
||||
- Support vector machines
|
||||
- works for linear and nonlinear data
|
||||
- if nonlinear will map data into higher dimension
|
||||
- attempts to find optimal linear separating hyperplane
|
||||
- training can be slow but model is accurate
|
||||
- Margins expand as much as they can past the decision boundary until hitting the closest points
|
||||
- ![[SupportVectorMachine.excalidraw]]
|
||||
- algorithm attempts to maximize margins in order to have most distance between classes
|
||||
- "support vectors" are the closest points to the decision boundary
|
||||
- margins: perpendicular distance from the hyperplane to closest instance
|
||||
- no probabilities are given
|
||||
- mapping functions are used to map data into higher dimensional space
|
||||
- inner product: function that combines two vectors to one scalar value (dot product)
|
||||
- different kernels can be used
|
||||
- polynomial kernel: good when data is not linearly separable but has regular curved boundary
|
||||
- RBF: default when boundary is complex or unknown
|
||||
- Sigmoid: good when modeling data similar to neural network behavior.
|
||||
- Decision trees
|
||||
- greedy, continues forward and does not backtrack
|
||||
- features must be categorical, discretize continuous features beforehand
|
||||
- conditions for stopping partitioning
|
||||
- all samples belong to same class for certain node
|
||||
- no remaining attributes for partitioning
|
||||
- no samples left
|
||||
- each leaf node represents a predicted class
|
||||
- decisions
|
||||
- numerical uses inequalities
|
||||
- categorical uses equality
|
||||
- decision trees divide feature space with hyperplanes perpendicular to decision feature's axis
|
||||
- measure of fit
|
||||
- node is completely pure if all instances belong to same class
|
||||
- impurity measures include gini coefficient, entropy
|
||||
- gini coefficient
|
||||
- imputiry reaches a max at 0.5 (classes are evenly split)
|
||||
- more of one class or another means that data is less split
|
||||
- entropy or log loss
|
||||
- negative ensures positive purity value
|
||||
- not used quite as much
|
||||
- overfitting can occur if tree gets too deep
|
||||
- should stop tree early
|
||||
- can also prune leaves
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
#rs/discussion #rs/class/csb320
|
||||
- - -
|
||||
I've been enjoying the course so far and learning about new machine learning ideas that I haven't spent much time on before. At first it was a little strange that the lectures, ZyBooks and Kaggle cover a lot of the same content but now I like how it has helped to reinforce the concepts for me and give me practice. I feel more confident with all the different functions and processes and I think the repetition has helped. I'm looking forward to learning more about machine learning and getting better at using the tools!
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,17 @@
|
||||
#rs/class/hea150 #rs/discussion
|
||||
- - -
|
||||
##### Replying to Javier
|
||||
Hi Javier,
|
||||
I agree with your point about mental health not being covered enough by the media and talked about as an issue that we need to solve. As someone currently in high school, there is definitely more talk about these topics in and outside of class, but I think there is still room to grow. It is also likely that being in a progressive city such as Seattle results in more discussion on these issues, and there are many other places in the country that have much more distance to cover. I also agree that there is a lot of unnecessary coverage on the diets of celebrities and not enough on the real causes of the rising obesity rate. It also seems to me like there are companies or people advertising different solutions to weight loss that have not been thoroughly tested in an attempt to make money off of this issue.
|
||||
|
||||
#### Replying to Derrick
|
||||
Hi Derrick,
|
||||
I agree with you that there needs to be less of a stigma around discussing mental health issues, especially in professional environments. Especially with how large a part of our lives social media is now, more research needs to go into how if affects our lives. I also agree with your point that routine diseases don't get enough coverage in the news, and I think this is a larger problem that extends to much more than just disease outbreaks. There are often things in the world that are very dangerous and large issues such as wars and natural disasters that get overlooked in the media either because they have been in the news cycle for too long or aren't unique enough to warrant a story. I think that diseases are a great example of this, and some of the most deadly are covered very little because they are so routine, even if they also affect the largest number of people.
|
||||
|
||||
#### Replying to Kristionna
|
||||
Hi Kristionna,
|
||||
I agree with your point that social isolation is an issue that needs to be talked about more, and I think it is especially important after the COVID pandemic. There are many kids and teenagers right now that went through COVID during formative years in their lives. This is the time where many people learn how to be social and manage friendships and social interactions, and due to the quarantine many kids lost out on these opportunities. I don't think we've fully seen the results that this will have yet, and I think it is something we definitely need to focus on more. I also agree that media coverage on weight loss is often on medications or shots that advertise themselves as the best way to lose weight, while methods that are more beneficial long term like eating healthier foods and exercising more are often not emphasized or covered.
|
||||
|
||||
#### Replying to Hassen
|
||||
Hi Hassen,
|
||||
I think that your point is interesting about the media not focusing on issues like heart disease that have a higher mortality rate and instead focusing on other issues such as mental health. While I do agree that there should be more coverage on issues such as heart disease and their causes, one of the causes of heart disease is stress which is related to mental health. Especially with things like social media increasing the amount of stress in many people's lives, I think that mental health is an important issue to discuss since stress can lead to an increased risk of many conditions that do have a high mortality rate.
|
||||
@@ -0,0 +1,5 @@
|
||||
#rs/class/hea150 #rs/discussion
|
||||
- - -
|
||||
1. A health issue that I believe is not publicized enough is the recent findings of many types of cancers increasing in prevalence for people under the age of 50. A recent study found that the incidence of 14 types of cancer increased for people under the age of 50. While difference in screening guidelines and detection can lead to some of these effects, they don't account for everything and factors such as a rise in obesity and change in diets is also likely a cause. I believe that this issue should be covered more because cancer very deadly and we need to raise awareness and work towards cures as much as we can. This issue largely affects physical wellness, since cancer causes damage to your body, but it can also cause damages to the other dimensions as an effect of a deterioration of physical wellness, or the knowledge that a cure doesn't always work.
|
||||
2. A health issue that I think is receiving too much attention in the media right now is the current administration's claims about the causes of autism. The secretary of Health and Human Services recently claimed that mothers taking acetaminophen while pregnant leads to an increased risk of their children developing autism once they are born. This has become a large news story, partially because there little to no studies supporting it and many that refute this claim. Even if some of the media coverage is pointing the lack of evidence that was presented to back up this claim, there is still media coverage that is not doing this. Because there was no real evidence presented to support this claim I don't believe that it should be a news story so that people aren't misled into believing that studies have shown that there is a link between painkillers during pregnancy and autism. (https://www.cbsnews.com/boston/news/trump-autism-tylenol-medical-experts/)
|
||||
3. I was assigned to look at Guatemala. Currently, the life expectancy of Guatemala is 71.9 for females and 65.6 for males. The average life expectancy in Guatemala is about 3 years less than the rest of the world, and 8 years less than that of America. The top causes of death in Guatemala are COVID-19, Ischaemic heart disease and Diabetes mellitus. The population in Guatemala is also growing very rapidly, and currently only 5.9% of the population is over the age of 65. Something that I found interesting was that while the life expectancy around the world fell after the COVID-19 pandemic, Guatemala's fell more sharply than the world average. Especially with COVID being the largest cause of death by a large margin, I wonder if Guatemala experienced the pandemic worse than many other countries in the world. COVID-19 being the largest cause of death didn't surprise me since it was such a deadly disease and killed so many people, but I was surprised how much the population skews to the younger side. I was also surprised that diabetes was one of the largest causes of death in Guatemala, since it doesn't seem to be one here in America.
|
||||
@@ -0,0 +1,7 @@
|
||||
#rs/assignment #rs/class/hea150
|
||||
- - -
|
||||
1. I chose the year 1925.
|
||||
2. The most common cause of death in 2023 and 1925 is heart disease, and cancer is in the top five most common causes for both years as well.
|
||||
3. While COVID-19 is the tenth most common cause of death in the United States in 2023, the common flu was the second most common cause of death in 1925. Strokes are also the fourth most common cause of death in 2023, while they are not in the top ten in 1925.
|
||||
4. The most common cause of death in the United States currently is heart disease, which is a noncommunicable disease meaning that it is a result of behavioral, environmental and genetic factors. One of the reasons why heart disease is a large cause of death in the United States is the rising obesity rate and amount of processed, unhealthy food that Americans are eating. The obesity rate has been rising for decades in the United States, and obesity can lead to increased blood pressure which is a risk factor for heart disease. The diet of Americans has gotten progressively more processed and has included more salts, sugars and fats which leads to an increased risk for obesity. These are likely reasons for why heart disease as well as diabetes are such common causes of death currently.
|
||||
5. Recently I have seen stories about a lot of the most common causes of death in the United States. Cancer has been in the news recently in relation to budget cuts and the reduced ability for our country to research possible cures, and I think it is still in media because it is represented as a goal that our country and the world is working towards solving. Accidents also often make the news because they are shocking and make for good news stories. There has also been talk about heart disease and obesity in the United States with one of the current HHS's focuses being on reducing the processed food in our diets.
|
||||
@@ -0,0 +1,19 @@
|
||||
#rs/class/hea150 #rs/discussion
|
||||
- - -
|
||||
|
||||
### Replying to Robert
|
||||
Hi Ruopu,
|
||||
I didn't read the article about safe practices for online dating, but I agree that older people might not be as familiar with things that seem obvious to us now. Especially since online dating is something that really wasn't a thing too long ago, many people who are now older didn't grow up with it existing and learning about the benefits and downsides. For the video from Jimmy Kimmel I was actually surprised with how much the interviewees were willing to share. It did seem like many of them were hesitant but a lot of them did end up answering the questions asked.
|
||||
|
||||
|
||||
### Replying to Rui
|
||||
Hi Rui,
|
||||
I also read an article about the difficulties that LGBTQ+ people face in assisted living homes. One of the things that stood out to me was the idea that many of these people have to go "back into the closet" and hide who they are in order to get adequate care in an assisted living home. I agree that it is essential to create environments for older LGBTQ+ people to live as they age and I hope that the introduction of new training for staff and programs can help.
|
||||
|
||||
### Replying to Hassen
|
||||
Hi Hassen,
|
||||
I also read the article about the challenges for LGBTQ+ people in places for long-term care. The statement about having to "go back into the closet" stood out to me when reading as well since it seems like they have to move backward in terms of their self-identity in order to move forward in their life. Especially since assisted-living homes are supposed to be a place to receive care and have more opportunity than living at home, it seems counter intuitive that many people have to leave an integral part of themselves behind to receive this care.
|
||||
|
||||
### Replying to Johan
|
||||
Hi Johan,
|
||||
When reading the article about the challenges faced by LGBTQ+ people in assisted living facilities I also didn't make the connection about the backgrounds of many nursing home staff. It seems like there are many different factors that come to together including the cultural norms from the nursing staff, lack of training, and cultural norms from the others living there. It is especially challenging now since the people currently in assisted living homes grew up during a time when social norms in the United States around gender were much more restrictive and less accepting than they are today.
|
||||
@@ -0,0 +1,6 @@
|
||||
#rs/class/hea150 #rs/discussion
|
||||
- - -
|
||||
|
||||
1. I read the article "What LGBTQ Seniors Face in Assisted Living and Care Facilities" from the Minneapolis-St. Paul Magazine. This article discussed many of the challenges of aging LGBTQ+ people who are starting to need to go into long-term care. It discusses how many assisted-living homes have a lot of discrimination and how many LGBTQ+ people have to go into the closet for long-term care. The article then goes into the current lack of training for staff on meeting the needs of LGBTQ+ people. This results in them not knowing how to properly care for everyone and means that many assisted-living homes are not a good option for aging LGBTQ+ people. One part of this article that stood out to me was when it discussed that another challenge for aging LGBTQ+ people currently is that many of them do not have adult children to help care for them. This is dues to same-sex marriage not being legalized when most of them were of childbearing age and adoption and fertility options being much more limited. I hadn't thought of this, and it was memorable since it is a unique challenge that only current aging LGBTQ+ people are facing.
|
||||
2. I chose to read the article "Sexuality and Intimacy in Older Adults" from the National Institute on Aging. This article discussed many changes that might occur in people's sexual lives as they age. It says how many older people redefine what sexuality and intimacy mean to them and might look for different things than they had previously. The article talks about both physical and emotional changes such as fewer distractions, more time, and health conditions. It then goes through a list of things that might cause problems in the sexual lives of older adults such as arthritis, chronic pain, dementia, and heart disease. There are many medications and other ways to get around these challenges, and this reading suggests solutions such as exploring new options or looking for medications.
|
||||
3. One of the things that I was surprised about in the video was the openness that many of the older people interviewed discussed their sex lives with. The older adults in my life don't discuss these things, likely since there is the idea that they aren't appropriate to discuss with others. It seems like especially with older people it is seen as socially inappropriate to discuss sex or sexuality with others.
|
||||
@@ -0,0 +1,6 @@
|
||||
[[Health Week 10]]
|
||||
|
||||
1. I inquired on behalf of myself and chose the web-based questionnaire.
|
||||
2. The questionnaire started by giving me 4 words to remember. After giving me the words it had a list of 10 simple math questions to answer such as 14 - 6 or 26 + 15. Once these were done, There were 10 questions where I was given a color with a letter removed and had to type the full name of the color. The questions included words like "gren" and "ble" and I had to type in "green" and "blue." After this they asked you to type in each of the four words that were given to you at the start to see if you had remembered them. I was able to remember all the words without any clues so the site said that there is likely no cause for concern for my thinking or memory.
|
||||
3. I watched the video "Ray and Mariel: Living with Young-Onset Dementia." This video described the story of Mariel and her father Ray who was diagnosed with Alzheimer's at the age of 52. The video illustrates the challenges that come with early-onset dementia and the many changes that take place in those who have the condition. One of the things it describes is how Ray lost his ability to speak and form coherent sentences which shows an impact to his intellectual wellness since he is no longer able to focus on speech. The video also describes how "to an extent his world has shrunk a lot" which shows an impact on social wellness as well. Since it is much harder for Ray to leave the house and he isn't able to communicate with others very well it is likely hard for him to maintain social relationships outside his direct family who are caring for him. Early-onset dementia can also have impacts on the wellness of those around the person diagnosed. The stress of having to care for someone with this condition can have an effect on emotional, intellectual, and social health since so much time has to be put in to care for them.
|
||||
4. One item on the list from the Alzheimer's Society that could help to reduce my risk for dementia is making sure to regularly exercise. I do exercise now, although most of the things that I do are focused on strength work and not cardio. The Alzheimer's society recommends working on both strength and cardio regularly to reduce the risk of dementia. This could look like me going on a run a few times a week in the morning to work on my cardio as well as continuing to do strength work.
|
||||
@@ -0,0 +1,17 @@
|
||||
#rs/class/hea150 #rs/discussion
|
||||
- - -
|
||||
### Replying to Julien
|
||||
Hi Julien,
|
||||
I asked ChatGPT a pretty similar question and it seems like we got similar results as well. It is interesting that when I looked at the sources it gave me, they all seemed to be from reputable places and about the topic. I wonder why when asked two very similar questions it will pull up very different sources to make a similar point. I also agree that social media usage can be a wide variety with some people using it a lot and others not using it much, and I can definitely see this trend in the people I know.
|
||||
|
||||
### Replying to Hassen
|
||||
Hi Hassen,
|
||||
When I asked ChatGPT a similar question, It gave me some positive aspects of social media use along with the negative ones. I think it is really interesting that your response only mentioned the negative aspects, and gave different sources. I also agree with the idea that even though the idea of social media is to keep us connected, it can end up making us feel even more isolated. With how many things on the internet are fake now, it can feel like the world we see on our screens doesn't match that of reality and it can become disconnected from the real world.
|
||||
|
||||
### Replying to Alan
|
||||
Hi Alan,
|
||||
I have had similar experiences interacting with ChatGPT where it will give a very surface-level overview of a topic without showing much nuance. I think this is partially due to how these language models are designed, since they work by essentially predicting the next word in the sentence based on the average of all of the text on the internet. While some of the more modern reasoning models are better at generating some more unique-sounding thoughts, they still have to go off of the information they were trained on leading to mostly summarization.
|
||||
|
||||
### Replying to Rui
|
||||
Hi Rui,
|
||||
I agree with your idea that generative AI can often provide information in a more unbiased way than traditional media, and I think that an interesting difference that I see is that when generative AI cites a fake source, it will often do so "unknowingly" and confidently state the fact as the truth. On the other hand, when human created media cites false evidence or expresses false claims, it will often be in a way that stretches the truth more rather than completely disregarding it. I also agree that the balance between using social media to know what is going on in the world while not being sucked in can be hard. It is important to be aware of current events, but so many platforms have addictive algorithms that it can be hard to stay up to date and not end up endlessly scrolling.
|
||||
@@ -0,0 +1,5 @@
|
||||
#rs/class/hea150 #rs/discussion
|
||||
- - -
|
||||
1. I watched the interview of Savannah Sellers on NBC and read the article on NPR about the effects of social media on the body images of teens. The interview on NBC was on a special about the mental health of teens and the effect of social media. It discussed many of the challenges that young people today are facing. Whether is is a decreased body image, fear of missing out from social media or the fear of a school shooting, one of the primary statistics that was discussed was that 42% of teens experience persistent feelings of sadness or hopelessness. The article on NPR that I read was specifically about body image and its relationship with social media use. It discussed a study where one group continued to use social media regularly while the other reduced it to one hour per day. The study found that the group spending less time on social media had more self confidence and a better body image after only three weeks of cutting back social media use.
|
||||
2. The question I asked ChatGPT is "I am doing some research on the potential effects of social media on the mental health of teenagers. Could you give me some examples of what these might be with some reasons why? Please provide sources as well." In the response I got, ChatGPT listed both negative and positive effects on the mental health of teens that social media use causes. For the negative effects, It listed most of the common ones that are commonly seen in the media such as increased anxiety, decreased self-esteem, cyber bullying and the fear of missing out. It did discuss some less common points such as sleep quality and mental fatigue, but nothing new to me. The response also talked about some of the positive effects of social media, which aren't talked about as often in the media from what I have seen. It did only give four points on this though, and most of them were restating similar ideas of social media allowing teens to express themselves and find people similar to them. The sources that it provided were good as well, and it referenced sources such as the mental health advisory from the Surgeon General, peer reviewed studies, Hopkins Medicine, the Mayo Clinic and more. Interestingly enough, all of the sources except one from this year were written in 2023. Overall, I think it gave a pretty good response and I liked that it considered the potential positive effects along with the negative ones. There wasn't anything that I hadn't seen before, but I also asked it for a general overview of the topic.
|
||||
3. I personally don't use much social media in my daily life, although I know many people who do. I use apps such as discord and slack for team communication, although I don't have any apps like Instagram, TikTok or X. Even without these apps, there are definitely still times where I have a fear of missing out, although I don't think it is quite as prominent as it would be if I was using these platforms. I also know a lot of people that use many of these apps extensively, and there are times where I feel that it goes to far and that it would be good for them to pull back a little. Based on my personal experience growing up in a world so heavily influenced by social media, I agree with the ideas that it can be unhealthy to constantly be seeing what your friends are doing and being exposed to idealized portrayals of others. Although I haven't been involved in any extreme cases of this, I still see many smaller instances of these ideas and can see where they would come from.
|
||||
@@ -0,0 +1,5 @@
|
||||
#rs/assignment #rs/class/hea150
|
||||
- - -
|
||||
1. The personality type that I got was architect, INTJ-A. My traits were introverted: 71%, intuitive: 64%, thinking: 61%, judging: 69% and assertive: 64%.The personality type of architect is someone who is often an analytical thinker and is always looking for ways to expand their knowledge and learn something new. They will also often focus on working alone, and trust themselves more than anyone else. They will have high standards for themselves, and due to their analytical nature personal relationships can sometimes be challenging and they might not be the best at navigating emotional situations.
|
||||
2. For the career path, architects tend to focus on technical fields like tech and science. Their analytical thinking can also make them a valuable addition to many companies, although career growth can be challenging due to the networking and social aspects required. Overall, I think that this description fits me pretty well as I enjoy working in more technical fields and want to go into technology or science for work. At school, I am part of the robotics team and also love taking science, technology and math classes. I also find networking challenging sometimes, and can definitely see this being one of my weaknesses in my future career. There are also times where I find delegating tasks challenging in school or other projects since I often trust myself the most to complete them in time and well. This is definitely something I need to work on, especially as I start working in larger groups and organizations.
|
||||
3. I think that one advantage of a personality test like this can be to help someone identify some of their weaknesses so that they can work on them. Often, it can be hard for people to find areas where they can improve, and a tool like this could help them. Defining someone's personality like this can be a disadvantage though, since it might box someone into a specific type and make them feel like they can't change. If someone sees the results and the weaknesses it describes, they might feel like it is inevitable for them to have these weaknesses due to their personality type and not have the ability to improve them.
|
||||
@@ -0,0 +1,17 @@
|
||||
#rs/class/hea150 #rs/discussion
|
||||
- - -
|
||||
### Replying to Suri
|
||||
Hi Suri,
|
||||
I have definitely also experienced having trouble focusing during on a day where I don't get much sleep the night before. It is interesting how lack of sleep can cause both short-term and long-term memory problems, I wonder how similar the short-term memory effects are to conditions like Alzheimers. The findings from your study on the effect of sleep on stress, inflammation and blood pressure is also interesting, it is crazy how many conditions and parts of our bodies are affected by the amount and quality of sleep we get.
|
||||
|
||||
### Replying to Hassen
|
||||
Hi Hassen,
|
||||
I also try to get more sleep whenever I have something important the next day like a big test or presentation. It is usually better to prioritize sleep the night before something important rather than trying to study for it more, and I try to do this whenever I can. The article on people with lactose intolerance is interesting, I didn't know that consuming dairy would have an effect on their dreams. I wonder if maybe the nightmares are partially caused by the disrupted sleep, or if there is some other cause.
|
||||
|
||||
### Replying to Hollyanne
|
||||
Hi Hollyanne,
|
||||
I agree that getting 30 minutes of sunlight a day can be very beneficial for my mood, and this tip reminds me of seasonal affective disorder. One of the symptoms of this is sleep difficulties which seems to line up well with the recommendation to get 30 minutes of sunlight a day to improve sleep quality. The connection between sleep and anxiety is also interesting, since it seems like it would cause a feedback loop of anxiety causing a decrease in sleep quality which in turn would cause an increase in anxiety.
|
||||
|
||||
### Replying to Alan
|
||||
Hi Alan,
|
||||
It is interesting in your study that sleep quality seems to matter more for cancer risk than the duration. Since the impact of sleep duration on cancer depends on the tissues affected, I wonder which types of cancer are better treated or mitigated by more sleep. Treating sleep disorders to improve the outcome of cancer treatment is also interesting to me, especially with the added stress of these treatments often contributing to poor sleep as you mentioned.
|
||||
@@ -0,0 +1,5 @@
|
||||
#rs/class/hea150 #rs/discussion
|
||||
- - -
|
||||
1. On average, I get about 9 hours of sleep per day. Based on the NHLBI's website, they recommend that I get 8-10 hours of sleep per day so I am getting a good amount of sleep each night. Getting enough sleep helps with growth an development especially with children and teens, and also helps to form long-term memories. By getting enough sleep, my body is better able to recover each day and I have more energy in the morning. Not getting enough sleep can lead to decreased immune system effectiveness as well as increasing the risk of chronic disease.
|
||||
2. After taking the Epworth Sleepiness Scale quiz, I got a score of 1 and a category of "Normal Sleepiness." I think that this aligns pretty well with how I feel throughout the week, since I don't have many problems with feeling tired throughout the day. For me, I think that the sleep tip of waking up at the same time each day would be helpful since although I wake up at the same time on weekdays, I usually sleep in on the weekends. This is likely harming my body's ability to get used to a consistent sleep schedule, and it is something that I will look into changing going forward. Some of the tips that are not a helpful for me are the ones about limiting alcohol and caffeine consumption since I don't drink either of those and don't have to worry about them effecting the quality of my sleep.
|
||||
3. I looked into the effect of a healthy sleep schedule on the risk of getting dementia. The resource that I found is a paper from 2025 titled "Associations of adherence to a healthy sleep pattern with the dementia risk in the UK biobank" from the journal "Alzheimer's Research & Therapy." This paper explored data from the UK Biobank which included about half a million participants who filled out a survey and later, 40,000 of which underwent MRI scans. The study took the data from a survey given to all of the participants and grouped sleep habits into 5 categories of healthy sleep. These categories included sleeping 7-8 hours a day, being a morning person, not having frequent insomnia, no snoring and no frequent daytime sleepiness. For each of these traits that a participant demonstrated, a point was given on a five point scale. The study found that for each increase of one point on this scale, there was a 7% decrease in the risk of dementia. This is likely because healthier sleeping habits help to maintain brain structure leading to less of a risk of dementia. This shows the importance of maintaining healthy sleeping habits to reduce the risk of diseases later in life.
|
||||
@@ -0,0 +1,6 @@
|
||||
#rs/assignment #rs/class/hea150
|
||||
- - -
|
||||
|
||||
1. For the family history of cardiovascular problems, I answered that no one had problems before the age of 55, which raised my estimated age from 75 to 77. For the next question about blood pressure, I answered that I do not know my blood pressure, since it is something that I get checked at doctors appointments, but I don't check regularly on my own. This lowered the estimated age by two years. For the question about stress, I answered that Stress is a positive influence for me, which increased the expected age to 76. I also answered that I get 30 minutes of walking 4 days a week for exercise which increased it to 78 and that I eat more than 5 portions of fruits and vegetables which increased it to 81. I also wear a seatbelt which increased it to 82 and I haven't had any accidents which increased it to 83. I also don't drink, smoke or use drugs for recreation which increased the estimated age to 87. Finally, I regularly schedule doctors visits, which raised the estimated age to 88 years.
|
||||
2. High blood pressure, smoking, physical activity, obesity, stress, substance use, genetics, age and sex are all mentioned in the survey. Out of these, all but genetics, age and sex are controllable.
|
||||
3. Overall, I wasn't very surprised by the results of this survey, since I do many things that lower my risk of cardiovascular disease such as exercising and eating healthy. There are many limitations to this website, such as that it mostly focuses on the risk of cardiovascular disease and doesn't have many questions on something else. Even though heart disease is the top cause of death in the United States, there are still many other conditions and scenarios that this survey does not address. There isn't much about cancer risk which is the second highest cause of death, and there are only one or two questions about car accidents which fall into the third highest category. Although this test can give a general risk assessment for cardiovascular disease, there are many other things that impact life expectancy including profession, living conditions, hobbies and much more.
|
||||
@@ -0,0 +1,18 @@
|
||||
#rs/class/hea150 #rs/discussion
|
||||
- - -
|
||||
|
||||
### Replying to Jalissa
|
||||
Hi Jalissa,
|
||||
It is sad to hear how much of a problem food insecurity is in Chad. It seems like there are many different factors such as rising global temperatures, climate change and an increase in refugees that are all combining to lead to more food insecurity in places like Chad. I'm glad that there are programs in place like IFAD thought that are working to support farmers. The state that I looked at was Alabama, which has has a 17.5% food insecurity rate compared to the 12.3% of Montana. With how much of a problem food security is in Montana, it is sad to see that it still has a relatively small food-insecure population when compared to other states.
|
||||
|
||||
### Replying to Suri
|
||||
Hi Suri,
|
||||
I didn't know about the Good Food Kitchens Program, but it sounds like a great way to help keep restaurants open and help to combat food insecurity. Especially with all of the cuts to the SNAP program, hopefully programs like this can help to pick up some of that slack and help to feed those in need. Food insecurity is a problem all across the country, and I wonder if even though Maryland is known as a rich state, that means that there is just a larger wealth gap that still leads to similar levels of food insecurity.
|
||||
|
||||
### Replying to Alan
|
||||
Hi Alan,
|
||||
I also read the CNN article about companies lowering prices for their products, and I agree that these companies acting nervous doesn't really reflect the truth. I think it really shows the lengths that many of these companies go to to get the most money from consumers. I am glad that many of these companies are lowering prices, but that is likely because they weren't able to predict or understand the state of the economy and are too disconnected from the working class that is buying their products. The ski resorts in Colorado is an interesting point, and it would make sense that economic factors like tourism would affect the food insecurity rate.
|
||||
|
||||
### Replying to Addison
|
||||
Hi Addison,
|
||||
I looked at the state of Alabama for my research, which is in a similar area of the country to Arkansas. Even though Alabama has a higher food insecurity rate than the country average, it still isn't quite as high as Arkansas. It seems like many of the states with the highest food insecurity rates are in the South East portion of the country, which I didn't know before this assignment.
|
||||
@@ -0,0 +1,5 @@
|
||||
#rs/class/hea150 #rs/discussion
|
||||
- - -
|
||||
1. I read the article from CNN about how retailers have been lowering consumer prices after raising them to much over time. Retailers are always trying to earn the most money from consumers, and to do this they often raise prices as high as they can while consumers are still willing to pay. With the recent economic downturn and much less people having discretionary money to spend on things like extra clothing and furniture, retailers have realized that they might have raised prices too much. Many companies, including Ikea, Walmart and Michaels are lowering their prices in an attempt to bring consumers back into their stores to spend money. This didn't directly mention food insecurity, but it does mention that not only are the lower and middle classes spending less, but so are the higher classes. If even the higher classes aren't spending as much on discretionary purchases, the lower and middle classes are likely struggling to put food on the table and have enough to eat every day.
|
||||
2. I was assigned the state of Alabama. In Alabama, there are 896,510 food insecure people which make up 17.5% of the population. 52% of the population of Alabama is also above the SNAP threshold. Overall, this wasn't too surprising to me since the statistics from Alabama are pretty similar to the national average, and especially similar to states around Alabama. the national average percentage of food insecurity is about 3% lower than Alabama's though, so they do have a higher percentage of people that are not able to get enough food. Compared to states in the North like Minnesota and North Dakota, Alabama does have a much higher food insecurity rate, although there are other states like Arkansas and Oklahoma that are even higher than Alabama.
|
||||
3. I am pretty lucky, since there is a grocery store a few blocks from where I live. This makes it a pretty easy 5 minute walk and I will often go there to pick up something we are missing for dinner or another meal. While it doesn't have the best variety of foods, it still does have some fresh produce and will usually have what we are looking for. For my diet, I try not to eat too many processed foods and minimize the number of microwaved or pre-made meals. I also try to eat fruits or vegetables with every meal to ensure that I am getting the nutrients that I need. There are definitely still areas for improvement though, and making sure that I get enough of each of the food groups would help to make my diet better.
|
||||
@@ -0,0 +1,7 @@
|
||||
#rs/assignment #rs/class/hea150
|
||||
- - -
|
||||
1. The parameters that I used were 5'6", 125 lbs, moderate exercise, and I looked at male.
|
||||
2. For my parameters, the ADA recommended that I have at least 57-102 grams of protein per day. The CDC also recommended that I get 55-191 grams of protein per day, and the WHO recommended 47 grams per day as a safe lower limit.
|
||||
3. To maintain my weight, a calorie allowance of 2241 is recommended. If 40% of my energy is from carbs, then 239 grams is recommended. For 55% 329 grams is recommended, 388 grams for 65% and 448 grams for 75%.
|
||||
4. To maintain my current weight, it is recommended that I eat 64-89 grams of fat per day. This is 20-30% of my energy intake and to reduce the risk of heart disease it is recommended that I eat <7% or <18 grams or saturated fat per day.
|
||||
5. When doing this, I wasn't too surprised by any of the numbers, although it was nice to see some of them. I know that people should generally have ~2000 calories per day, but I had never looked at exact numbers. I don't track these amounts too closely in my daily life, but this might make me pay more attention than I have in the past. It was also interesting to see the recommendations from different sources and how they differed. I wonder how these organizations choose these numbers and why they would be different from one another. One benefit for a calculator like this is to allow people to make more informed healthy decisions, although it might be a little misleading. Just saying that you need a specific amount of protein, carbs and fat per day doesn't take into account the needed vitamins, minerals or things like how processed the food is. Other factors that are also required to stay healthy and have a balanced diet. Someone could get enough protein just drinking milk, but that probably isn't the best idea for a balanced diet.
|
||||
@@ -0,0 +1,17 @@
|
||||
#rs/class/hea150 #rs/discussion
|
||||
- - -
|
||||
### Replying to Addison
|
||||
Hi Addison,
|
||||
I read the article from NPR about eating disorders among men as well, and I was surprised by the numbers for the ratio of men to women with eating disorders. It was pretty surprising to me how different the old and new ratios are, and how much data it seems like we have been missing or how much of a change in behavior there has been relating to eating disorders. I also chose to look at research focusing on an older audience around eating disorders, although I looked more at the elderly population. It is interesting to me how every age range has risks for developing eating disorders, although there are many different reasons for this happening. Younger people might develop them due to unhealthy body images, middle-aged people might develop them due to stressors such as divorce or parental death, and older people might develop them due to disease or lifestyle changes.
|
||||
|
||||
### Replying to Suri
|
||||
Hi Suri,
|
||||
The article that I read was also about eating disorders in young men, although it looked at it more generally. I agree that body image and low self-esteem can harm anyone, and there are many different sources or ideals that this might come from. The information about eating disorders among French college students is interesting, I didn't realize that such a large portion of students would suffer from an eating disorder. I wonder what the number would be for college students in other countries, and if it is similar to those in France.
|
||||
|
||||
### Replying to Alan
|
||||
Hi Alan,
|
||||
I read an article from NPR which also discusses eating disorders among young men, although a little more broadly. I agree with your point about bias around who can develop eating disorders leading to an under diagnoses of men with eating disorders, which explains the statistic mentioned in my article that now people estimate the ratio of women to men with eating disorders to be closer to 2-3 to 1 rather than 10 to 1. It is interesting to me that muscle dysphoria is most prevalent in men who internalize the "muscular ideal" and not the "thin ideal." It seems to me that this might be one of the differences between the causes of eating disorders generally in men and women where women tend to be focused more on being thin, and men tend to focus more on being muscular due to societal expectations.
|
||||
|
||||
### Replying to Mariama
|
||||
Hi Mariama,
|
||||
Your description of eating disorders in South Korea is very interesting, and I didn't realize how much of an economic impact that they could have on a country. It is interesting to think about how even if countries might be taking an economic hit from eating disorders, there are many companies, especially in the United States, that are likely profiting off of them by selling more unhealthy food, supplements or something else.
|
||||
@@ -0,0 +1,4 @@
|
||||
[[Health Week 5]]
|
||||
1. I listened to a podcast from NPR about eating disorders in young men and boys rising in prevalence, or at least in the number known. They mention how it was previously thought that the ratio of females to males with eating disorders was five to one, but now it is being estimated as closer to two or three to one. This is largely due to the idea that to be attractive, men should have as much muscle and as little fat as possible. As a result, many young men and boys are eating much less in an attempt to lose weight and going to the gym very often to gain muscle. Some of the causes described in the podcast is seeing male role models in movies and ads always being very lean with a lot of muscle, as well as other people complimenting guys more when they have lost more weight. One person describes his experience of praise he got after losing weight leading to him going to the gym several times a day and eating much less than he should have been to lose even more weight. I wasn't overly surprised by this information, since I have been exposed to many of the same influences and agree that the "ideal male physique" is harmful to body image. I do also think that one of the reasons for the rising rates of male eating disorders is because more young boys and men are going to doctors and asking for help like described in the podcast where a doctor talks about having more males as patients. Overall, this seems like a good thing and I am glad that more people feel comfortable seeking help and feel able to find ways to solve problems and move forward.
|
||||
2. The podcast that I listened to highlights the effects of eating disorders across many of the dimensions of wellness, including both social and physical. One of the situations that this podcast highlights as a challenge for people with eating disorders is going out to a restaurant with friends, and feeling like you could not participate in these things because you feel ashamed. This would likely cause a large impact on someones social life, and might make them fearful or anxious about certain situations and lead them to try and avoid them. The podcast also discusses the physical impacts of eating disorders, and how not getting enough nutrition for the body will lead to fatigue and being tired. Over time, this will take a toll on someones body, and especially if they are not able to sleep as well as a result of an eating disorder, it will lead to even farther reaching physical effects resulting from not getting enough sleep.
|
||||
3. I decided to look into eating disorders in older populations, since it seems like a group that is not often discussed in relation to eating disorders and weight loss. I used Google to look for information, and when searching a surprising amount of the results are from academic journals or reputable sources. One paper that I found was published in the Nutrients journal and is titled "Anorexia of Aging: Risk Factors, Consequences, and Potential Treatments." This paper describes the impacts of increasing age on a decrease in appetite and food intake. It also describes how this is a prevalent issue and how there are many factors from advancing age that promote a lack of appetite such as disease, lifestyle, and social conditions. It also discusses some solutions such as taking nutritional supplements and how these approaches are not often pursued in clinical practice. When searching for articles, the first few that I found seemed to be pretty good. Scrolling down revealed some that aren't directly related or from less reputable sources, but overall there was a good amount of reputable information when searching Google about this topic.
|
||||
@@ -0,0 +1,6 @@
|
||||
#rs/assignment #rs/class/hea150
|
||||
- - -
|
||||
1. For my other two countries, I chose Japan and France. In the United States, the total calorie intake has gone up since 1961 going from about 3000 kcal to 3800 kcal. In Japan, the total calorie intake rose from 2400 kcal to 2900 kcal in the 1980s, but since then it has gone down to about 2700 kcal. In 1961, France had a total calorie intake of about 3100 kcal which rose to about 3600 kcal in 2000 and has stayed about even with that since.
|
||||
2. Most of the increase in total calories consumed in the United States has come from an increase in calories from fat. Animal protein and carbohydrates have risen a little, but plant protein has largely stayed the same since 1961. In Japan, the calories from carbohydrates has gone down from about 1800 kcal to 1400 kcal since 1961. The amount of fat did increase until the 90s, but since then it has stayed more or less the same. calories from animal and plant protein have also not changed much since 1961. In France, the calories from carbohydrates have dropped a little along with a small increase in calories from fat. Similar to the other two countries, animal and plant protein has largely been the same since 1961.
|
||||
3. All three countries that I looked at have seen some amount of increase in the amount of calories gained from fat, and this is likely due to a rise in processed foods throughout the world that contain a higher fat content than more organic or whole counterparts. The United States saw a much larger increase in the amount of fats consumed though, likely because there are many more fast food chains here, and there are many companies that have focused their efforts on the United States market and advertised processed food to the population. All three countries also didn't have much change in the amount of calories gained by plant or animal protein, possibly because changes in diets over the last 50 years have been focused more on fast food, junk food and sweets rather than meats, fruits or vegetables. This is probably why the carbohydrates and fat calories are changing the most, since these newer types of foods mostly contain calories from those sources.
|
||||
4. The second chart that I chose was the "Share of dietary energy supply from fats vs. GDP per capita." This chart is a graph with GDP per capita on the x-axis and the share of dietary energy from fats on the y-axis, and it plots each country on this chart based on these two statistics. The size of the circle for the country also represents the population of that country. This graph shows a pretty clear positive trend meaning that the more GDP per capita a country has, or generally how wealthy it is, the higher amount energy its population gets from fats. I wasn't very surprised by this information, since more developed countries will generally have diets composed of more processed foods leading to a higher fat intake. There is also an option to see the data animated over time, and it is sad to see how most of the countries are trending towards a higher amount of energy from fat in their diets.
|
||||
@@ -0,0 +1,18 @@
|
||||
#rs/class/hea150 #rs/discussion
|
||||
- - -
|
||||
|
||||
### Replying to Hollyanne
|
||||
Hi Hollyanne,
|
||||
I also read the article about the student at a Maine high school became central in the debate around trans athletes. I agree that the attention put on individuals, especially high school students, like this is likely very harmful to the and their classmates. I believe that discussion should be focused more on policies and rules rather than specific students. Focusing on specific kids does likely make for better headlines, but people who make the policies and the news should be focused more on large-scale or group based studies rather than individual cases.
|
||||
|
||||
### Replying to Stephanie
|
||||
Hi Stephanie,
|
||||
I also read the article about the student in Maine, and I also found the fact that the whole situation started due to someone in power posing on social media about a specific student. It is concerning to me that people in those positions feel that it is a good idea to single out individual students to try to get their message across and convince others. There is almost always a larger story and while interviews and personal accounts can be helpful, when making policies and decisions I think that a larger picture should be considered.
|
||||
|
||||
### Replying to Robert
|
||||
Hi Ruopu,
|
||||
Your summary of the article you read is interesting, and as someone who also climbs I agree that most of the people that I see climbing are white males. There are definitely a lot of sports, especially ones that aren't as popular, that are not very diverse whether that is due to cost factors, historical exclusion or something else. I also agree that the opinion of the high school students playing the sports is important since they are participating, although I do think that adult voices can be helpful in making decisions as well. Especially when these decisions can affect students across the country I hope that voices from adult leaders can help to make sure everyone's needs are met.
|
||||
|
||||
### Replying to Griffyn
|
||||
Hi Griffyn,
|
||||
I also watched the ESPN video about the science behind the debate on trans athletes and I also appreciated that the video took a more scientific view without taking a side. I think it is important for people to realize how much data we are lacking related to this debate and how there really isn't much conclusive in either direction yet. I also agree that participating in sports, especially at a high school level should be based on inclusivity and ensuring that everyone can participate, be competitive and have fun. Especially when there is debate around high school or even middle or elementary school sports, it seems like people often forget that these kids are not professional athletes in most cases.
|
||||
@@ -0,0 +1,6 @@
|
||||
[#rs/class/hea150 #rs/discussion
|
||||
- - -
|
||||
|
||||
1. I was assigned the state of Pennsylvania to look at for this assignment. According to the Movement Advancement Project, 4.1% of adults and 5% of the workforce in Pennsylvania is LGBTQ+. The state has a "fair" ranking for their overall policy tally with a value of 16.75/49. Some of the issues with no protection for LGBTQ+ people include family services nondiscrimination laws, credit and lending nondiscrimination laws, anti-bullying laws, and jury service nondiscrimination. Across all the counties in Pennsylvania, only 37% of the population of the state is protected. None of the counties have state level protections, and only 4 have county level protections.
|
||||
2. I watched the video from ESPN about the science behind the debate around transgender athletes in sports. This video summarized many of the biological components of this debate, including the effect of the hormone testosterone on athlete performance. If people transition after puberty, many sports organizations require them to go through hormone therapy to lower testosterone levels before they can compete. Testosterone in larger levels can contribute to increased muscle mass and strength. The video also emphasized how there is still a lot that we don't know about this issue since there is very little research on the topic. The total number of transgender athletes is very small, so up until now there has been very little research on these topics. One part of this video that was memorable to me is the idea that while athletes that have transitioned and undergone hormone replacement therapy may still have some advantages, they also have disadvantages in some aspects compared to other athletes. Especially if their muscle mass has decreased as a result of less testosterone, their larger frames can be harder to move as efficiently in some sports.
|
||||
3. I believe that students should have input into the process of deciding who can participate in sports, but should not have the responsibility of actually deciding. I think that the actual decisions should be left to adults, likely in legislative bodies, who are able to look at the research and a broader perspective to make the best decision possible. While I think that the perspective of students participating in sports is important to take into account when making these decisions, I think it is better to have people who have more experience making the decisions. Hopefully, they will better be able to see multiple perspectives and take them into consideration better than students might be able to.
|
||||
@@ -0,0 +1,11 @@
|
||||
#rs/class/hea150 #rs/discussion
|
||||
- - -
|
||||
|
||||
22. One controllable behavior that can increase risk for type 2 diabetes is eating an unhealthy diet. This can often lead to being overweight or obesity which is a risk factor for type 2 diabetes. By eating healthier foods you can lose weight and lower your risk for type 2 diabetes. On this note, education is a determinant of health that can increase or decrease risk for type 2 diabetes. If young kids are taught how to eat healthy and manage their weight and cardiovascular health, they will have a smaller chance of becoming overweight as adults and having a higher risk of diabetes. If these ideas are not taught though, these people likely won't know the best ways to stay healthy and have an increased risk for type 2 diabetes.
|
||||
23. - The two types of cancer with the highest 5-year relative survival rates are thyroid and prostate with 98% and 97% survival rates, respectively. The two types of cancer with the lowest 5-year relative survival rates are pancreas and liver & intrahepatic bile duct with 13% and 22% survival rates, respectively.
|
||||
- Higher survival rates of cancer likely communicate that cancers such as thyroid and prostate and more easily or widely detected earlier in their life cycle than others like pancreas or liver and intrahepatic bile duct. At the first signs of these cancers, steps can be taken to halt the progress of the cancer and stop it as a form of secondary prevention.
|
||||
24. For stage four: action Medina might be reaching out to more people and going out more often to parties and events to network and gain more friends. This stage will consume a lot of energy and likely be hard for her which has the possibility of leading to a relapse and her deciding to stop reaching out to others and returning back to where she started or an earlier stage. Before reaching the next stage, the benefits of her knowing new people and feeling more socially connected have to outweigh the extra time and effort spent to build and foster these connections.
|
||||
|
||||
For stage five: maintenance Medina might be continuing to go out with her new friends and connections and working on maintaining their relationships. In this stage, she enjoys the new people that she knows and feels much better about her social life and connections than she did at the start of the process. She likely has learned a better sense of empathy and can connect with others better than she could before. There is still a chance of relapse, although less likely than the previous stage due to the positive effects from her improved social wellness.
|
||||
25. The video starts out with the heart beating several times and the chart rises with each beat up to about 180 mm Hg. After this, the heartbeat stops and the measurement slowly decreases linearly until is is at 127 mm Hg which is the systolic blood pressure. The sound of the heartbeat returns, but quieter this time and the value continues to decline in pulses with each beat until 79 mm Hg which is the diastolic blood pressure reading. The value then decreases at an increasing rate and the video ends.
|
||||
26. One of the stress management techniques described in HEA150 is the use of breathing techniques where there is a focus on deeper, less frequent breathing helping to bring a more relaxed state. There are many different timings or approaches that can be used, but generally someone will breathe in deeply, hold their breath for some time and then release it slowly. This can help to improve emotional wellness since it can aid in dealing with emotionally challenging situations evoking anger, anxiety, or sadness. Breathing techniques can help to recenter and lower your heart rate and control your emotions in a more positive way.
|
||||
@@ -0,0 +1,70 @@
|
||||
#rs/class/hea150 #rs/assignment
|
||||
- - -
|
||||
|
||||
1. The article provided is about Tobacco farmers in Zimbabwe who grow tobacco for a large international company. This company claims to be protecting their rights and informing them about the risks of growing tobacco, but Admire and his family, the farmers interviewed for this story, never got this information. One of the risks of farming tobacco is green tobacco illness, which is caused when nicotine is absorbed into someones body with symptoms such as nausea, dizziness, and headaches. There are measures that can be taken to lessen the impact such as waterproof clothing and gloves, but families like Admire's often don't know about these measures or cannot afford them.
|
||||
2. One of the problems that Admire is facing is a lack of knowledge about the heath risks that could arise due to tobacco farming. Even though the large companies state that they value the health of their farmers, they are still profit-driven companies. It is likely much cheaper for them to hand the farmers a packet or nothing at all rather than hosting training and teaching farmers about the risks and factors to mitigate it. The cost of protective gear is also a barrier for tobacco farmers, which likely comes down to cost for the large companies as well. By charging their farmers for protective gear, they are able to earn even more money from them while still appearing like they are giving the farmers opportunities to obtain protective equipment.
|
||||
3. The question I asked ChatGPT was "I am doing research for school about green tobacco illness and I was wondering where in the world it is the most common and what populations it affects the most?" It gave me a breakdown of both where in the world green tobacco illness is most prevalent and which populations are most affected. Both sections were pretty similar with it saying that tobacco growing countries and individuals are the most impacted. It also cited percentages from studies on the prevalence of the disease in Brazil, Thailand and among Latino farmers in the United States. The first two studies seem like good sources that match what was in the answer, but the last one comes from an article referencing a study saying that 41% of tobacco farm workers reported green tobacco illness and most were Latino rather than that 41% of Latino farmers reported green tobacco illness.
|
||||
4. Overall, the ChatGPT response was pretty good giving an overview of the topic and stating some general points about the issue. One of the biggest differences between a response from ChatGPT and an article from a source like the Human Rights Watch is that ChatGPT will never go out and actively report on an issue. It is limited by the information that is already on the internet and is not able to actively gather anything new. On the other hand, journalists are able to go to the places affected and gather new information on what is happening through interviews, photos, and more. They can cover new and developing stories in a way that generative AI models that just summarize the internet cannot.
|
||||
|
||||
Another thing that I have noticed about the responses from ChatGPT is that it is not great at telling a story. It mostly just seems to give a list of facts and doesn't do much to make you interested or wanting to read more. The article from the Human Rights Watch not only gives you similar information, but it also walks you through the story of someone affected by this issue and tells it in an engaging way that ChatGPT did not. There are some advantages that ChatGPT has such as being able to answer personalized questions in a way that journalists cannot, but it is still often factually incorrect and misquotes facts or ideas.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## ChatGPT response:
|
||||
|
||||
Here is a summary of what I found out about **Green Tobacco Sickness** (GTS) — where it’s most common and who is most affected:
|
||||
|
||||
---
|
||||
|
||||
### 🌍 Where it’s most common
|
||||
|
||||
- GTS is an occupational illness caused by **dermal absorption of nicotine** from handling _wet_ or _green_ (uncured) tobacco leaves. ([Lippincott Journals](https://journals.lww.com/ijoe/fulltext/2017/21030/green_tobacco_sickness__a_brief_review.2.aspx?utm_source=chatgpt.com "Indian Journal of Occupational and Environmental Medicine"))
|
||||
|
||||
- It is especially common in regions that do tobacco cultivation. Major tobacco‐producing countries include China, Brazil, India and the United States. ([PMC](https://pmc.ncbi.nlm.nih.gov/articles/PMC6786486/?utm_source=chatgpt.com "Perspective Green tobacco sickness: Mecamylamine, varenicline, and nicotine vaccine as clinical research tools and potential therapeutics - PMC"))
|
||||
|
||||
- Studies have found in specific areas:
|
||||
|
||||
- In a tobacco‐growing region of Brazil: a prevalence of **56.9%** among workers (71.7% for women, 35.3% for men) in one study. ([BioMed Central](https://bmcresnotes.biomedcentral.com/articles/10.1186/s13104-018-3135-x?utm_source=chatgpt.com "Green Tobacco Sickness among Brazilian farm workers and genetic polymorphisms | BMC Research Notes | Full Text"))
|
||||
|
||||
- In part of Thailand: a prevalence of **22.6%** among tobacco farmers (17.9% in men; 27.5% in women) in one district. ([PMC](https://pmc.ncbi.nlm.nih.gov/articles/PMC6977054/?utm_source=chatgpt.com "Green Tobacco Sickness among Thai Traditional Tobacco Farmers, Thailand - PMC"))
|
||||
|
||||
- In the U.S. among migrant Latino farmworkers doing tobacco work: about **41%** reported GTS at least once during the season. ([Atrium Health Wake Forest Baptist](https://newsroom.wakehealth.edu/news-releases/2000/02/tobacco-farm-workers-may-contract-tobacco-sickness-study-shows?utm_source=chatgpt.com "Tobacco Farm Workers May Contract Tobacco Sickness, Study Shows | Atrium Health Wake Forest Baptist"))
|
||||
|
||||
- A review article says the prevalence “varies from 8.2 % to 47 % globally.” ([Lippincott Journals](https://journals.lww.com/ijoe/fulltext/2017/21030/green_tobacco_sickness__a_brief_review.2.aspx?utm_source=chatgpt.com "Indian Journal of Occupational and Environmental Medicine"))
|
||||
|
||||
- Because the illness is strongly tied to tobacco leaf harvesting/handling in places with moist/wet leaves and manual labor, it will be more common in low‐ and middle‐income countries where large scale manual tobacco farming is done. One WHO Q&A mentions that “as many as **1 in 4** tobacco farmers are affected by green tobacco sickness” in tobacco growing countries. ([World Health Organization](https://www.who.int/news-room/questions-and-answers/item/world-no-tobacco-day-2023---grow-food--not-tobacco?utm_source=chatgpt.com "World No Tobacco Day 2023 – Grow food, not tobacco"))
|
||||
|
||||
|
||||
---
|
||||
|
||||
### 👥 Which populations are most affected
|
||||
|
||||
- **Tobacco farm workers**: Anyone who directly handles green tobacco leaves (harvesting, curing, etc) is at risk. ([PubMed](https://pubmed.ncbi.nlm.nih.gov/29618907/?utm_source=chatgpt.com "Green Tobacco Sickness: A Brief Review - PubMed"))
|
||||
|
||||
- **Women**: Some studies show higher rates in female workers. For example – in Brazil, 71.7% of women in that sample had GTS vs 35.3% of men. ([BioMed Central](https://bmcresnotes.biomedcentral.com/articles/10.1186/s13104-018-3135-x?utm_source=chatgpt.com "Green Tobacco Sickness among Brazilian farm workers and genetic polymorphisms | BMC Research Notes | Full Text")) In Thailand the rate was higher in women than men (27.5% vs 17.9%) in one study. ([PMC](https://pmc.ncbi.nlm.nih.gov/articles/PMC6977054/?utm_source=chatgpt.com "Green Tobacco Sickness among Thai Traditional Tobacco Farmers, Thailand - PMC"))
|
||||
|
||||
- **Children & family members**: Although less data, there’s indication that children working in tobacco fields or assisting in family farms are vulnerable due to lower body weight, longer exposure, etc. For example, the WHO Q&A points out that “women and children are often the primary tobacco labourers … children are particularly vulnerable”. ([World Health Organization](https://www.who.int/news-room/questions-and-answers/item/world-no-tobacco-day-2023---grow-food--not-tobacco?utm_source=chatgpt.com "World No Tobacco Day 2023 – Grow food, not tobacco"))
|
||||
|
||||
- **Workers without protective gear in wet/leaves‐moist conditions**: Risk factors include working when leaves are wet (dew, rain), lack of use of personal protective equipment (PPE), and poor hygiene (wet clothes) which increase absorption of nicotine. ([WHO Extranet](https://extranet.who.int/fctcapps/fctcapps/fctc/kh/alternativelivelihoods/e-library/green-tobacco-sickness-indonesias-tobacco?utm_source=chatgpt.com "Green tobacco sickness in Indonesia’s tobacco heartland: Sociodemographic and environmental determinants among farmers in Bondowoso regency | WHO FCTC"))
|
||||
|
||||
- **Non‐smokers or smokers?** Interestingly, some studies suggest that current smokers have _lower_ risk of GTS, maybe because they are somewhat “tolerant” to nicotine absorption from other sources. For example, in the Indonesian study, smokers had a lower prevalence ratio of GTS (APR = 0.60) compared to non‐smokers. ([WHO Extranet](https://extranet.who.int/fctcapps/fctcapps/fctc/kh/alternativelivelihoods/e-library/green-tobacco-sickness-indonesias-tobacco?utm_source=chatgpt.com "Green tobacco sickness in Indonesia’s tobacco heartland: Sociodemographic and environmental determinants among farmers in Bondowoso regency | WHO FCTC"))
|
||||
|
||||
|
||||
---
|
||||
|
||||
### ✅ Key takeaways for your research
|
||||
|
||||
- GTS is most **common in tobacco‐growing regions**, especially in **low and middle income countries** where manual labour in tobacco harvesting is common.
|
||||
|
||||
- Among those labourers, **women, children**, and those with **high exposure (wet leaves, no PPE, long hours)** are especially at risk.
|
||||
|
||||
- The illness is **under‐reported** and prevalence varies widely depending on the study/population, but you’ll often see rates from ~8% up to over 50% in high‐risk groups.
|
||||
|
||||
- Preventive measures (wet‐leaf handling, protective gloves/clothing, avoiding harvesting when leaves are wet) are important but often lacking in many farming contexts.
|
||||
|
||||
|
||||
---
|
||||
|
||||
If you like, I can **look up country‐by‐country data** for GTS (which countries have studies and their reported prevalence) and send you a table + map so you can include it in your school project?
|
||||
@@ -0,0 +1,17 @@
|
||||
#rs/class/hea150 #rs/discussion
|
||||
- - -
|
||||
### Replying to Robert
|
||||
Hi Ruopu,
|
||||
I agree that stable housing can be a good solution for those struggling with alcohol abuse especially when it is very challenging for these people to stop drinking. One of the sources that I looked at provided evidence showing that using one of these programs decreased the taxpayer money going to these people while improving their outcomes. Housing that requires the residents to be sober can often leave out many people who are not able to do that and can end up leading to more trips to the emergency room and ambulance rides.
|
||||
|
||||
### Replying to Rose
|
||||
Hi Rose,
|
||||
I also read an article about the Oaks Residence in Canada, and I agree that it can be a very important place for people struggling with addiction to have available to them. I like your reference to Maslow's Hierarchy of Needs because it makes sense that people struggling with alcohol addiction, especially to the point where they need it to not suffer extreme withdrawal symptoms, wouldn't be able to think about much else. Managed alcohol programs can allow them to focus on other needs further up the pyramid and regain their footing again more easily.
|
||||
|
||||
### Replying to Sirapusson
|
||||
Hi Sirapusson,
|
||||
I also read an article about the Oaks Residence, and it is interesting how one of your articles focused more on the policy side of these projects. From the articles I read, it seems like many of these are still in early stages and there has not yet been wide adoption. One of my articles mentioned how it was very challenging to get funding for the project since many people hear that they are giving alcohol to alcoholics and don't want to fund it. It seems like these have an overall positive effect on the community and people living in the housing, so hopefully they can gain more traction and wider support in the future.
|
||||
|
||||
### Replying to Julien
|
||||
Hi Julien,
|
||||
I also watched one of the videos about the 1811 Eastlake project, and I agree that it seems like a great idea to help give these people an opportunity that they would not have had otherwise. Allowing residents to slowly drink less alcohol seems like the best way to help them recover, especially with the extreme withdrawal symptoms that can be caused with these levels of reliance. I also like your point about reducing crime, since these programs providing alcohol removes the need to steal it that many of these people had before entering the program.
|
||||
@@ -0,0 +1,5 @@
|
||||
#rs/class/hea150 #rs/discussion
|
||||
- - -
|
||||
1. I watched the video about the research base behind harm reduction for alcohol use in Seattle and read the article "The shelter that gives wine to alcoholics." Both of these sources discussed the idea of managed alcohol programs (MAPs). A very large percentage of people that are struggling with homelessness are also struggling with alcohol addictions and since many shelters require those using them to be sober, many people are not able to use them. With a severe alcohol addiction, it can be challenging for these people to focus on other aspects of their lives and often it will be very challenging for them to improve their situation. Managed alcohol programs help these people by eliminating the concern of withdrawals which can cause death as well as their need to beg for or steal alcohol. Many people in these programs are able to then focus on other parts of their life and even eventually start drinking less and moving away from their addictions. Both of these sources discussed many of the same ideas and advantages to these programs, although the video discussed its implementation in Seattle while the article was discussing these programs in Canada.
|
||||
2. When reading about these problems and some of the solutions that have been tried, I don't have a very strong opinion since I don't feel like I know very much about this topic. After reading the articles though, it does make sense to me that for many people who have severe alcohol addictions there is often not an option for them to simply stop drinking. Especially with extreme withdrawal symptoms, providing the opportunity to slowly decrease alcohol intake and avoid these symptoms seems like a good way to decrease dependence even though it might take more perseverance or dedication.
|
||||
3. I haven't seen many examples of alcohol abuse or dependence in my life, but based on media and the articles I have read alcohol abuse can have a large impact on the people around someone. When someone is always looking for where their next drink will be or is not sober very often it can be hard for them to connect with the people around them which can result in them losing contact with the people they love. In one of the articles I read there was a story about a man who had lost contact with his sons because he didn't want them to see him as an alcoholic. This can also affect people on a much larger scale and several of the articles mentioned the increased spending on emergency room visits and ambulance usage. This can affect the community at large, and programs like MAPs have been shown to help decrease this spending and improve outcomes for these people.
|
||||
@@ -0,0 +1,15 @@
|
||||
#rs/assignment #rs/class/hea150
|
||||
- - -
|
||||
|
||||
1. For the calculator, I looked at data for a male weighing 130 lbs using American units.
|
||||
|
||||
| Number of Drinks | Type | Blood Alcohol Level (g/210 L breath) | Psychological Effect |
|
||||
| ---------------- | ------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| 1 | Light beer | 0.000 | This drink would be small enough to have no impact or symptoms present in the person. |
|
||||
| 2 | Frozen daquiri | 0.075 | This is in the euphoria stage where the person has less self-control, judgement, and attention. There also may be some motor impairment and decreased processing speed |
|
||||
| 3 | Gin and tonic | 0.043 | This value is between the subclinical and euphoria stages which means that there might not be any noticeable behavior excepting special tests. There also may be some symptoms such as decreased judgement, control and information processing. |
|
||||
| 4 | Manhattan | 0.194 | This value is between the excitement and confusion stage. The excitement stage includes symptoms such as emotional instability, impairment of perception, and reduced visual acuity. The confusion stage includes symptoms such as disorientation, mental confusion and an increased pain threshold. |
|
||||
| 5 | Double on the rocks | 0.269 | This value is between the confusion and stupor stage. The stupor stage includes symptoms such as approaching the loss of motor functions, highly decreased response time and the inability to stand or walk. |
|
||||
| 6 | Margarita | 0.172 | This value is in the excitement stage, which would include symptoms such as impairment of perception, decreased sensatory response and impaired balance. |
|
||||
3. One thing that I was surprised about in this exercise was that having one light beer in a two hour period would likely result in a blood alcohol value of 0.000 g/210 L of breath. It makes sense that the alcohol will eventually leave the blood stream and the person will no longer be intoxicated, but I was surprised that after only two hours there is essentially no effect from drinking a light beer especially for someone who is only 130 lbs. One advantage of obtaining this information online could be spreading awareness about the alcohol content in different kinds of drinks. There are likely some drinks that have a higher or lower concentration that people might think, and knowing this can help them to make safer decisions when drinking in the future. One limitation of obtaining information online is that there are many assumptions being made about the person and drink content. The site does have a disclaimer at the bottom claiming this, and there are many physical factors that could change someone's BAC from the value predicted by this calculator. The drinks in this tool also have preset alcohol concentrations that likely differ based on where you get the drink from and who makes it. The value predicted is likely an average, and in reality it could differ widely from store-bought drinks to custom mixed ones.
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#rs/class/hea150 #rs/discussion
|
||||
- - -
|
||||
|
||||
### Replying to Robert
|
||||
Hi Ruopu,
|
||||
I agree that giving people a space to safely use their drugs and get clean tools seems like a better way to help solve the drug crisis rather than further stigmatizing drug use. Especially with many drugs being increasingly used in medical scenarios, it is strange to me that they are still as stigmatized as they are. During prohibition, people didn't stop drinking alcohol and it likely made the problem worse. Especially with drugs where illegal drugs are more likely to have incorrect amounts and lead to overdoses, it seems like allowing safe options for people could be a better approach than attempting to prevent drug use through laws.
|
||||
|
||||
### Replying to Julien
|
||||
Hi Julien,
|
||||
I agree that it is likely more challenging to regulate drug use when they are illegal since most of the ways that they are obtained are from black-market sources. Several articles discussed the idea that by obtaining drugs illegally, the odds that they contain incorrect amounts or the wrong drug is much higher and often leads to overdoses. I also watched the video from CNN, and it seems like even though they are technically illegal the OPCs in New York are very beneficial for the communities that they are a part of.
|
||||
|
||||
### Replying to Rose
|
||||
Hi Rose,
|
||||
Similar to the establishments described in last week's discussion, giving people an opportunity to focus on aspects of their lives other than their addiction seems like a great way to help them recover and get back on their feet. If all they can think about is where they will find the drugs or alcohol they need to prevent withdrawal, it can be hard to do anything else. I like your idea about including more stories about recovery from drug usage in media. Especially with how much social media is a part of everyone's live now, themes and ideas in popular media can be a very large factors in the decisions we make.
|
||||
|
||||
### Replying to Goose
|
||||
Hi Goose,
|
||||
It was interesting to me as well that other countries have much different stances on OPCs than the United States does. With how large the war on drugs was and still is in the US though, it makes sense that programs like this have not gained traction yet. I'm glad that the article that you read focused more on the stories of several patients. The ones that I read took more of a high-level approach to the story which can be helpful, although the many perspectives on this issue is important to fully understand the impact.
|
||||
@@ -0,0 +1,6 @@
|
||||
#rs/class/hea150 #rs/discussion
|
||||
- - -
|
||||
|
||||
1. I haven't learned anything about overdose prevention centers before, so most of the information in the article was new to me. The idea that giving people a place to more safely use drugs makes sense to me. Similar to the establishments in the previous discussion with alcohol, allowing for a safe and controlled environment to help these people overcome and deal with their addictions seems like a good thing. One thing that surprised me is how many OPCs started out or are still operating illegally within their countries drug laws, especially centers in places in the US that are technically illegal but city governors or officials have promised not to enforce the laws. Based on research done and the long track record of these establishments, I am surprised that there are still places like the United States that they are still illegal. Even though the war on drugs in the United States started over 50 years ago, there still seem to be affects such as the legality of running an OPC.
|
||||
2. I chose to watch a video from CNN about the two overdose prevention centers located in New York City. This video described that these are places where people bring their own illegal drugs and are given the tools and space to safely take them. They also talked to one of the people who regularly goes there and some of the people that run the establishments. Many of the people working at these places are trained doctors and have the materials and abilities to treat overdoses if they happen onsite. Many of the advantages of these centers were discussed, such as providing a safe place for people to take their drugs that is not on the streets and providing resources to stop drug usage if participants are willing. The clip also talked about how the overdose prevention centers are not technically legal under federal law, although the last two mayors of New York City have promised not to enforce federal regulations and allow them to stay open.
|
||||
3. One community that I am a part of is my high school, and I think that while an OPC might not be a great idea, harm reduction services could be beneficial. My school already has a teen health center, which acts as a place for people to go when they need help. It doesn't provide the same services as the OPCs described in this weeks reading, and I think that it probably isn't the best idea to have something like that for a high school. Since most high school students using drugs likely aren't addicted yet, the school should focus more on preventative measures and education about the risks of recreational drug use. I think that OPCs can be helpful in other parts of the community, especially for adults who have been struggling with addiction for a long time. Most people would likely not be supportive of creating an OPC in a high school, but I think it could gain some support in the community for serving those in the area of the school rather than the students themselves.
|
||||
@@ -0,0 +1,6 @@
|
||||
#rs/assignment #rs/class/hea150
|
||||
- - -
|
||||
|
||||
1. Hallucinogen persisting perception disorder (HPPD) is a condition caused by the use of hallucinogenic drugs such as LSD or PCP. The symptoms include flashbacks and visual artifacts similar to those seen when using the drugs as well as potentially increased anxiety and depression. With HPPD, these occur when the person is completely sober and can have varying intensities depending on factors we don't completely understand. This condition likely affects only a small amount of people using these drugs, although we don't know exact numbers. There are several theories for what causes HPPD, including memories triggered by environmental factors similar to PTSD, senses being more likely to be altered after drug use and strong traumatic memories being accessed by flashbacks. Diagnostic tools can include questionnaires, a modified Tellegen Absorption Scale and the Visual Apophenia Luke Irvine Scale. Review of medications and blood work can also be used for a diagnoses. There is still much that is unknown about this condition, and most treatments only include symptom management rather than an actual cure. These can include benzodiazepines to slow down brain activity, SSRIs to treat depression and anxiety, and clonidine to alter nerve impulses in the brain.
|
||||
2. The second article that I read was "Psilocybin and LSD: What I learnt after experiencing 'psychedelic flashbacks'" from the BBC. There were many of the same ideas in both of these articles, and the second one that I read took a more personal approach by describing the experiences of the author with hallucinogenic drugs and their own experiences with HPPD. The first article focuses more on the causes, effects, symptoms, and facts of the condition while the second one provides more context into the history of the condition. The BBC article explains how even though the HPPD diagnoses is relatively recent, people have been experiencing similar conditions for a long time. It also discusses the stigma around hallucinogenic drugs and conditions such as HPPD. This has likely led to much less research going into conditions such as these, and it is also mentioned that many people with HPPD are worried that others will judge them if they reveal their conditions.
|
||||
3. After reading this it is sad to me that there is so little research on this topic largely due to how much drugs have been stigmatized in many places in the world. Especially in the United States there is a very large stigma around using these drugs and even though they are illegal, many people still use them and it seems important to do research into the effects that they might have on someone. It seems like there is much better research on things like alcohol usage since there is less of a stigma around drinking, even though it can also cause harmful effects. Especially with the rising use of drugs and especially hallucinogens in medical treatments, there isn't very much research on what the side effects might be and how we can avoid or treat them. The first article that I read focused more on the effects on physical and mental wellness of HPPD such as changes in perception and increased anxiety and depression. The second article I read also discussed these aspects, but also touched on social wellness by talking about the social stigma around using hallucinogenic drugs and how many people were afraid to tell others about their condition due to what they might think about their drug use.
|
||||
@@ -0,0 +1,18 @@
|
||||
#rs/class/hea150 #rs/discussion
|
||||
- - -
|
||||
|
||||
### Replying to Robert
|
||||
Hi Ruopu,
|
||||
I was also thrown a little off guard when the person in the video had their face painted. It does seem a little strange to arrange each of the guest's faces in a rainbow. I also read the article describing the stories of "9 young people" who are intesex and there is also a similar thread there of operations being performed that they didn't consent to. All of the people that I read about also seemed to be proud of who they are, although there are likely many others who's stories are not told that haven't found others like them yet.
|
||||
|
||||
### Replying to Hollyanne
|
||||
Hi Hollyanne,
|
||||
I also watched the TED Radio Hour by Lisa Mosconi and I am glad that there are people trying to close gaps in the research that we have about our brains. Aging, especially around diseases like Alzheimer's, is something that we still don't understand very well and it especially doesn't help that most research is only focused on males. Often looking at a more diverse group of perspective will reveal something important otherwise hidden, and I wouldn't be surprised if this was the case here. Especially since it seems like menopause has a larger impact on women's brains than declining testosterone levels has on men's research into this area seems vital.
|
||||
|
||||
### Replying to Kristionna
|
||||
Hi Kristionna,
|
||||
It was also a common theme in the sources I looked at that most people don't learn about the idea of being intersex and the community around it until later in their lives. Especially with how much it can matter to feel like part of a community of others going through similar experiences It's great that these communities exist. Many of the stories I read also discussed surgeries being performed without the people knowing or fully understanding the consequences which seems crazy to me since many of them can permanently alter many aspects of their lives.
|
||||
|
||||
### Replying to Mariama
|
||||
Hi Mariama,
|
||||
In the article about David Reimer the fact that David reclaimed his identity as male struck me as well. Even though Money declared the experiment as a "success," reading about what happened after the experiment seems to prove the contrary. Especially since the study was used as justification for many similar operations to take place later, it seems like we need more systems in place to ensure there are multiple perspectives on something like this and one person cannot decide how a scenario is approached.
|
||||
@@ -0,0 +1,6 @@
|
||||
#rs/class/hea150 #rs/discussion
|
||||
- - -
|
||||
|
||||
1. I watched the video titled "What Does Biological Sex Look Like In The Brain?" by Lisa Mosconi. This talk went over many of the effects that menopause has on women's brains and differences between men's and women's brains in middle age. The testosterone levels in men usually slowly decrease over time and don't have any sharp falloffs that might cause side effects. For women on the other hand, estrogen levels sharply fall during menopause usually around their early 50s. Mosconi describes how estrogen levels and the brain are linked and how estrogen is important for how much energy the brain produces. When estrogen levels decrease, overall brain energy levels do as well which can cause memory loss, headaches and other mental side effects. She also talks about the increased risk of dementia from this, since decreased estrogen levels can lead to an increased amount of amyloid plaques in the brain which is a risk factor for Alzheimer's disease.
|
||||
2. I read the story "9 Young People on How They Found Out They Are Intersex" from Teen Vogue. Two of the stories that stood out to me were those of Cat and Irene since both found out about the term "intersex" later in their lives. Not only feeling like they have to hide from others, but doing so because everyone tells them that there is something "wrong" with their bodies is awful, especially when finding others experiencing the same things can be so challenging. I understand if operations are necessary to survive or given with consent by the person receiving them, but it is so strange to me the number of unnecessary purely cosmetic operations that were described in many of the stories. Even if they might be more challenging to perform later in life, it seems like if there is no need to do them the person receiving them should have the choice of whether they happen.
|
||||
3. One community that I am a part of is my high school, and it seems to me like we are better educated about topics around sex and gender than other high schools, but that there is still missing knowledge. There are sex-ed units in some of the science classes at my school, although they are often short and cover the same small amount information as previous years. We also have a teen health center, which provides many services and information about these topics and helps to educate the students about many of these issues. I do think that there is more that could be done though since most kids don't pay much attention to these lessons.
|
||||
@@ -0,0 +1,6 @@
|
||||
#rs/assignment #rs/class/hea150
|
||||
- - -
|
||||
|
||||
1. The first source I read was "This biologist is figuring out how to short-circuit sperm as birth control" from PBS news. This article discussed a new contraceptive method being researched by Polina Lishko as something that males could take instead of women. The idea behind this birth control method is to cut off sperm cell's access to energy from their mitochondria which would stop them from reaching egg cells and causing a pregnancy. One substance being investigated is niclosamide which is an ointment used to treat tapeworm infestations and seems to cause sperm cells to lose the ability to get energy from their mitochondria. Some of the advantages that might come with this method include giving another option since different people prefer different contraceptives for many different factors. It would also specifically give males another option which could be very helpful since most are centered around women. The article mentions the possibility of men not being willing to take birth control medication like this, and although cost isn't explicitly mentioned it would likely be expensive since it is a new and experimental treatment.
|
||||
2. The second source that I read was "Long-acting contraceptive patch gives women DIY option for birth control" from NBC News. The new contraceptive method that this article discussed is a new patch that could be applied and administer hormones over a certain period. It uses the same hormones as other methods, although eliminates the risk of dirty needles or needing to go to a doctor for application. The patches use biodegradable needles to release the hormone and are projected to only cost $1 per dose. These new patches are cheap and could be a great option for developing countries where access to hospitals and medical professionals can be challenging. The team does not know if these patches will work in humans yet which could be a disadvantage, although with successful tests on rats they are optimistic.
|
||||
3. It seems like there is a lot of good research going in to new contraceptive methods right now. It seems to me like there is need for more methods for males to use, and many of the sources are discussing new areas of research into methods for this. Many established methods are also ones that might not work as well for developing countries due to cost or accessibility and developments such as the new birth control patches I read about seem like promising options in the future for other countries around the world. Needs that I have seen to be met include options with less side effects (especially from hormone-based options) and options that are more accessible to developing nations and teenagers.
|
||||
@@ -0,0 +1,20 @@
|
||||
#rs/notes #rs/class/math163
|
||||
- - -
|
||||
|
||||
- 3D lines
|
||||
- can be described as parametric
|
||||
- symmetric equation of 3D line $$ \frac{x-x_{0}}{a} = \frac{y-y_{0}}{b} = \frac{z-z_{0}}{c}$$
|
||||
- In this case, the direction vector is $<a, b, c>$
|
||||
- Distance between a point and a line
|
||||
- Is the shortest distance between the two
|
||||
- This is the segment perpendicular to the line
|
||||
- In 2D, you have to take random point on the line
|
||||
- then project vector from this point to point not on the line onto the line to find where the closest point on the line is
|
||||
- ![[Pasted image 20251014183240.png]]
|
||||
- In this parallelogram, we know the area is equal to either $v \times PM$ or the base * the height (the height is the distance beween M and the line
|
||||
- This gives the formula $$d=\frac{||PM \times v ||}{||v||}$$ For the distance between point M and the line
|
||||
- Lines in 3D
|
||||
- Can either be parallel, intersection, the same line or skew
|
||||
- skew is when they don't intersect but aren't parallel either
|
||||
- Planes in 3D
|
||||
- defined by the normal vector of the plane
|
||||
@@ -0,0 +1,3 @@
|
||||
#rs/notes #rs/class/math163
|
||||
- - -
|
||||
-
|
||||
@@ -0,0 +1,3 @@
|
||||
#rs/notes #rs/class/math163
|
||||
- - -
|
||||
-
|
||||
@@ -0,0 +1,7 @@
|
||||
#rs/notes #rs/class/math163
|
||||
- - -
|
||||
- Similar idea for multiplication, cross products and dot products with derivatives $$ \frac{d}{dt} [r(t) \times u(t)] = r'(t) \times u(t) + r(t) \times u'(t)$$ $$ \frac{d}{dt} [r(t) \cdot u(t)] = r'(t) \cdot u(t) + r(t) \cdot u'(t)$$
|
||||
- If $r(t) \cdot r(t) = c$, then $r(t) \cdot r'(t) = 0$
|
||||
- Principle unit tangent vector is defined as $$T(t) = \frac{r'(t)}{||r'(t)||}$$ as long as $||r'(t)|| \ne 0$
|
||||
- When there is a function of two variables with all real numbers as domain, it is written as $\mathbb{R}^2$
|
||||
- Can also write "domain: $\{(x,y) | x^2+y^2 \leq 9\}$"
|
||||
@@ -0,0 +1,13 @@
|
||||
#rs/notes #rs/class/math163
|
||||
- - -
|
||||
- Level curve
|
||||
- A 2D shape that results from setting a two-variable equation equal to a constant
|
||||
- can help to see the shape of a 3D function
|
||||
- basically like taking horizontal slices out of a two-variable function
|
||||
- Vertical trace
|
||||
- similar to level curve, finding the 2D shape from a vertical slice
|
||||
- can find with either $f(a, y) = z$ for constant $x = a$ or $f(x, b) = z$ for constant $y=b$
|
||||
- Both of these are used to visualize 3D functions in 2D
|
||||
- Functions of 3 variables
|
||||
- there is no great way to visualize these in 3 dimensions
|
||||
- have to take 3D "slices" out of the 4D shape
|
||||
@@ -0,0 +1,26 @@
|
||||
#rs/notes #rs/class/math163
|
||||
- - -
|
||||
- Direction angles
|
||||
- angles vector forms with axis
|
||||
- vector projection
|
||||
- Projection of one vector onto another: $$proj_{u}v=\frac{u\cdot v}{\left|\left|u\right|\right|^{2}}u$$
|
||||
- Vector that is same direction
|
||||
- To just get the magnitude of the projected vector, use: $$ mag_{u}v=\frac{|u*v|}{||u||^2} $$
|
||||
- Unit vectors
|
||||
- magnitude is one
|
||||
- Formula: $$ unit_u=\frac{u}{||u||}$$
|
||||
- Resolving vectors to components
|
||||
- project one vector to another
|
||||
- subtract projection from original vector
|
||||
- Determinate
|
||||
- equation: $$\begin{vmatrix} a&b\\c&d\end{vmatrix}\rightarrow ad-bc$$
|
||||
- larger than 2x2: $$\begin{vmatrix} a&b&c\\d&e&f\\g&h&i\end{vmatrix}\rightarrow a\begin{vmatrix} e&f\\h&i\end{vmatrix} - b\begin{vmatrix} d&f\\g&i\end{vmatrix} + c\begin{vmatrix} d&e\\g&h\end{vmatrix}\rightarrow a(ei-hf)-b(di-gf)+c(dh-ge)$$
|
||||
- Cross product
|
||||
- creates vector that is orthogonal to both vectors
|
||||
- for which direction it goes, use right hand rule
|
||||
- pointer finger is first vector, middle is second
|
||||
- thumb is resulting vector
|
||||
- equation: $$a \times b = \begin{vmatrix} i&j&k\\a_1&a_2&a_3\\b_1&b_2&b_3\end{vmatrix}= i(a_2b_3-a_3b_2)-j(a_1b_3-a_3b_1)+k(a_1b_2-a_2b_1)$$
|
||||
- cross product is not communitive $$u\times v \ne v \times u$$
|
||||
- it is anti-communitive though $$ u \times v = -(v \times u) $$
|
||||
- this too $$ a \times a = 0 $$
|
||||
@@ -0,0 +1,20 @@
|
||||
#rs/notes #rs/class/math163
|
||||
- - -
|
||||
- magnitude of the cross product
|
||||
- equation: $$||u \times v|| = ||u|| * ||v|| * \sin(\theta)$$
|
||||
- area of a parallelogram
|
||||
- if there are two (2D) vectors that are two adjacent sides, the area is $$||a \times b||$$
|
||||
- triple scalar product: $$u * (v \times w) = \begin{vmatrix} u_{1} && u_{2} && u_{3} \\ u_{1} && u_{2} && u_{3} \\ u_{1} && u_{2} && u_{3} \end{vmatrix}$$
|
||||
- (can either take the determinate of the matrix or the dot product of the cross product)
|
||||
- results in a scalar
|
||||
- This is equal to the volume of the parallelepiped with the three vectors representing adjacent edges
|
||||
- $$u * (v \times w) = (u \times v) * w $$
|
||||
- lines and planes in 3D space
|
||||
- can use 3D vectors to describe 3D lines
|
||||
- $PQ = tv$
|
||||
- $<x-x_{0}, y-y_{0},z-z_{0}> = t<a,b,c>$
|
||||
- $<x_{0}, y_{0}, z_{0>}$ is the initial point of the line (or just a point on the line)
|
||||
- $<a,b,c>$ is the 3D slope of the line
|
||||
- $t$ is the independent variable
|
||||
- can also write it as $$<x, y, z> = t<a,b,c> + <x_{0}, y_{0}, z_{0}>$$
|
||||
-
|
||||
@@ -0,0 +1,4 @@
|
||||
#rs/notes #rs/class/math163
|
||||
- - -
|
||||
- Equation for a normal plane to a curve: $$z = f(x_{0}, y_{0}) + f_{x}(x_{0}, y_{0})(x-x_{0}) + f_{y}(x_{0}, y_{0})(y-y_{0})$$
|
||||
-
|
||||
@@ -0,0 +1,14 @@
|
||||
#rs/notes #rs/class/math163
|
||||
- - -
|
||||
- Chain rule
|
||||
- If there is a function $z(x(t), y(t))$ then $\frac{dz}{dt} = \frac{dz}{dx} \frac{dx}{dt} + \frac{dz}{dy} \frac{dy}{dt}$
|
||||
- If $z=f(x(u,v), y(u,v))$ then $$\frac{{\partial z}}{\partial u} = \frac{{\partial z}}{\partial x} \frac{{\partial x}}{\partial u} + \frac{{\partial z}}{\partial y} \frac{{\partial y}}{\partial u}$$ $$\frac{{\partial z}}{\partial v} = \frac{{\partial z}}{\partial x} \frac{{\partial x}}{\partial v} + \frac{{\partial z}}{\partial y} \frac{{\partial y}}{\partial v}$$
|
||||
- Implicit differentiation
|
||||
- If $z$ is defined implicitly as a function of $x$ and $y$, then $$ \frac{dz}{dx} = - \frac{{\frac{{\partial f}}{\partial x}}}{\frac{{\partial f}}{\partial z}}$$ $$ \frac{dz}{dx} = - \frac{{\frac{{\partial f}}{\partial y}}}{\frac{{\partial f}}{\partial z}}$$
|
||||
- Critical points
|
||||
- For functions of two variables, this is when they both equal 0 or when one is undefined
|
||||
- Second derivative test: $$D = f_{x x}(x_{0}, y_{0})f_{y y}(x_{0}, y_{0}) - (f_{x y}(x_{0}, y_{0}))^2$$
|
||||
- if $D>0$ and $f_{x x}(x_{0}, y_{0})>0$ then $f$ has a local minimum at $(x_{0}, y_{0})$
|
||||
- if $D>0$ and $f_{x x}(x_{0}, y_{0})<0$ then $f$ has a local maximum at $(x_{0}, y_{0})$
|
||||
- if $D<0$ then $f$ has a saddle point at $(x_{0}, y_{0})$
|
||||
- if $D=0$ then the test is inconclusive
|
||||
@@ -0,0 +1,12 @@
|
||||
#rs/notes #rs/class/math163
|
||||
- - -
|
||||
- Double integrals
|
||||
- used to find volume underneath 3D curve $$\int \int f(x, y)dA = \lim_{ m,n \to \infty } \sum_{i=1}^m \sum_{j=1}^n f(x_{i}^*, y_{j}^*)\Delta A$$
|
||||
- Properties
|
||||
- sum: $$\int \int [f(x, y) + g(x, y)]dA = \int \int f(x, y)dA + \int \int g(x, y)dA$$
|
||||
- constant: $$\int \int cf(x, y)dA = c\int \int f(x, y)dA$$
|
||||
- Iterated integrals
|
||||
- the iterated integral for a function $f(x, y)$ over the rectangular region $R = [a, b] \times [c,d]$ is $$\int_{a}^b \int_{c}^d f(x, y)dy \ dx = \int_{a}^b\left[ \int_{c}^d f(x, y) dy\right]dx$$
|
||||
- Fubini's theorem
|
||||
- if a function is continuous over the region, then the double integral equals the iterated integral: $$\int \int f(x, y) dA = \int \int f(x, y)dx \ dy = \int_{a}^b \int_{c}^d f(x, y) dx \ dy = \int_{c}^d \int_{a}^b f(x, y) dy \ dx$$
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#rs/notes #rs/class/math163
|
||||
- - -
|
||||
- average value of a funciton of two variables over a region R is: $$f_{ave} = \frac{1}{Area \ R}\int \int_{R} f(x, y) dA$$
|
||||
-
|
||||
@@ -0,0 +1,20 @@
|
||||
#rs/notes #rs/class/math163
|
||||
- - -
|
||||
- Vectors
|
||||
- have both magnitude and direction
|
||||
- Operations on vectors
|
||||
- scalar multiplication
|
||||
- multiply both components of vector by the same scalar
|
||||
- doensn't change the direction of the vector
|
||||
- addition
|
||||
- add the corresponding components together
|
||||
- same as putting initial point of one on terminal point of other
|
||||
- subtraction
|
||||
- v - w can be represented as v + (-w)
|
||||
- when initial points are the same, difference is the vector formed between the two terminal points
|
||||
- can also add the negative of one vector to the other
|
||||
- Component form
|
||||
- when a vectors initial point is at (0,0) it can be written in component form
|
||||
- <x, y>
|
||||
- Magnitude
|
||||
- Pythagoras
|
||||
Reference in new issue
Block a user