Tumgik
#OR you could call it a negative cosine graph
i-like-old-things · 2 years
Text
Basically everyone: You shouldn’t take AP Calc since you don’t want to do STEM related stuff in life
Me: yeah, yeah, yeah, I’ll be fine
0 notes
program-800 · 4 years
Text
(An attempt at) visualising AO3 D:BH fics based on verb usage
Tumblr media
WIP. x Interactive visualisation on my Github page (link in description/Tumblr heading).
I’ve been terribly busy (at work, but also mostly in my own head). This is something I’ve been working on for a couple weekends, but I can’t get cleaner results so this write-up’s going up first while I slowly figure out improvements.
The idea was simple: can I cluster fics based on the actions that occurred within them? Obviously there’s going to be a couple clusters for smut, but how about fics which focus around character introspection, fics which focus on fluff dates, etc?
That’s what I tried here - and as is clear from the gif (tsne visualisation), the clustering didn’t work out fantastically. Details of process under the cut. Dataset is 16,211 D:BH fics published on AO3 between May 2018 to June 2020.
1. Clean up the fics. I didn’t do any stopword removal here because of step 2. Just removal of funny symbols, etc.
2. Pull out and clean the verbs. I used Spacy’s part of speech tagger for this. I also lemmatised all verbs pulled (so you may see some odd-looking words if you do explore the visualisation). Of course, sometimes the tagger misidentifies words as verbs, so you may see what should be nouns, etc. I’ve tried to remove character names at least by relying on the long list of names I created from running topic modeling on this corpus some time back.
3. TF-IDF weight the words. Basically, count how many times a verb appears in a fic, and then multiply it by the inverse count of how many fics the verb appears in. Words which are more ‘important’ or ‘representative’ of the fic in question should be weighted higher.
4. Perform non-negative matrix factorisation for dimensionality reduction. At this point, I could have possibly gone straight to tsne for visualisation with the tf-idf weights, but the results were even worse (if I recall). So I performed NMF. Like other topic modeling methods like LDA, the number of dimensions/topics to go for is user-prescribed.
I ran NMF from 10 to 60. At each point, I calculated the mean cosine similarity between all topics (we’d want something that’s lower, topics that are too similar to each other aren’t great). I picked 40 topics in the end, since that’s where the mean cosine similarity seems to level off. This is definitely a subjective call, but since I’m just really doing NMF for faster tsne visualisation, I was ok just eyeballing the graph and rolling with this.
Tumblr media
(The top 15 keywords for each topic can also be viewed on my Github page.)
5. Run tsne. I used sklearn’s implementation. I also normalised my NMF weights before submitting it for the run. I’m terribly new to tsne, so I’m pretty sure the parameters I selected weren’t great.
I went with a perplexity of 350, PCA initialisation, a learning rate of 100, a max number of 30,000 iterations with stopping if there is no improvement after 500 iterations. tl;dr, the output of tsne is heavily dependent on the parameters you set (there’s a great Distill article out there on this), and with my lack of experience I may have bungled this.
6. Visualise tsne. I used plotly’s scatterplot for this. Each dot is one fic. If you hover over the dot, you can see the top-5 tf-idf weighted verbs for it (the most ‘important’ verbs to that fic, according to the tf-idf metric).
Overall, the visualisation is more or less just a hairball, but to my amusement/chagrin, there appears to be what is a little nest of smutty-seeming fics lurking at the bottom:
Tumblr media
8 notes · View notes
Text
Absolute Minimum
Tumblr media
Free Minimum Calculator - find the Minimum of a data set step-by-step This website uses cookies to ensure you get the best experience. By using this website, you agree to our Cookie Policy. WordReference Random House Unabridged Dictionary of American English © 2019 ab′solute min′imumMath. Mathematics the smallest value a given function assumes on a specified set. ' absolute minimum ' also found in these entries. 👉 Learn how to determine the extrema from a graph. The extrema of a function are the critical points or the turning points of the function. They are the poi.
Absolute Minimum Math
Show Mobile NoticeShow All NotesHide All Notes
Tumblr media
You appear to be on a device with a 'narrow' screen width (i.e. you are probably on a mobile phone). Due to the nature of the mathematics on this site it is best views in landscape mode. If your device is not in landscape mode many of the equations will run off the side of your device (should be able to scroll to see them) and some of the menu items will be cut off due to the narrow screen width.
Section 4-3 : Minimum and Maximum Values
Many of our applications in this chapter will revolve around minimum and maximum values of a function. While we can all visualize the minimum and maximum values of a function we want to be a little more specific in our work here. In particular, we want to differentiate between two types of minimum or maximum values. The following definition gives the types of minimums and/or maximums values that we’ll be looking at.
Definition
We say that (fleft( x right)) has an absolute (or global) maximum at (x = c) if(fleft( x right) le fleft( c right)) for every (x) in the domain we are working on.
We say that (fleft( x right)) has a relative (or local) maximum at (x = c) if (fleft( x right) le fleft( c right)) for every (x) in some open interval around (x = c).
We say that (fleft( x right)) has an absolute (or global) minimum at (x = c) if (fleft( x right) ge fleft( c right)) for every (x) in the domain we are working on.
We say that (fleft( x right)) has a relative (or local) minimum at (x = c) if(fleft( x right) ge fleft( c right)) for every (x) in some open interval around (x = c).
Note that when we say an “open interval around(x = c)” we mean that we can find some interval (left( {a,b} right)), not including the endpoints, such that (a < c < b). Or, in other words, (c) will be contained somewhere inside the interval and will not be either of the endpoints.
Also, we will collectively call the minimum and maximum points of a function the extrema of the function. So, relative extrema will refer to the relative minimums and maximums while absolute extrema refer to the absolute minimums and maximums.
Now, let’s talk a little bit about the subtle difference between the absolute and relative in the definition above.
We will have an absolute maximum (or minimum) at (x = c) provided (fleft( c right)) is the largest (or smallest) value that the function will ever take on the domain that we are working on. Also, when we say the “domain we are working on” this simply means the range of (x)’s that we have chosen to work with for a given problem. There may be other values of (x) that we can actually plug into the function but have excluded them for some reason.
A relative maximum or minimum is slightly different. All that’s required for a point to be a relative maximum or minimum is for that point to be a maximum or minimum in some interval of (x)’s around (x = c). There may be larger or smaller values of the function at some other place, but relative to (x = c), or local to (x = c), (fleft( c right)) is larger or smaller than all the other function values that are near it.
Note as well that in order for a point to be a relative extrema we must be able to look at function values on both sides of (x = c) to see if it really is a maximum or minimum at that point. This means that relative extrema do not occur at the end points of a domain. They can only occur interior to the domain.
There is actually some debate on the preceding point. Some folks do feel that relative extrema can occur on the end points of a domain. However, in this class we will be using the definition that says that they can’t occur at the end points of a domain. This will be discussed in a little more detail at the end of the section once we have a relevant fact taken care of.
It’s usually easier to get a feel for the definitions by taking a quick look at a graph.
For the function shown in this graph we have relative maximums at (x = b) and (x = d). Both of these points are relative maximums since they are interior to the domain shown and are the largest point on the graph in some interval around the point. We also have a relative minimum at (x = c) since this point is interior to the domain and is the lowest point on the graph in an interval around it. The far-right end point, (x = e), will not be a relative minimum since it is an end point.
The function will have an absolute maximum at (x = d) and an absolute minimum at (x = a). These two points are the largest and smallest that the function will ever be. We can also notice that the absolute extrema for a function will occur at either the endpoints of the domain or at relative extrema. We will use this idea in later sections so it’s more important than it might seem at the present time.
Let’s take a quick look at some examples to make sure that we have the definitions of absolute extrema and relative extrema straight.
Example 1 Identify the absolute extrema and relative extrema for the following function. [fleft( x right) = {x^2}hspace{0.25in}{mbox{on}}hspace{0.25in}left[ { - 1,2} right]] Show Solution
Since this function is easy enough to graph let’s do that. However, we only want the graph on the interval (left[ { - 1,2} right]). Here is the graph,
Note that we used dots at the end of the graph to remind us that the graph ends at these points.
We can now identify the extrema from the graph. It looks like we’ve got a relative and absolute minimum of zero at (x = 0) and an absolute maximum of four at (x = 2). Note that (x = - 1) is not a relative maximum since it is at the end point of the interval.
This function doesn’t have any relative maximums.
As we saw in the previous example functions do not have to have relative extrema. It is completely possible for a function to not have a relative maximum and/or a relative minimum.
Example 2 Identify the absolute extrema and relative extrema for the following function. [fleft( x right) = {x^2}hspace{0.25in}{mbox{on}}hspace{0.25in}left[ { - 2,2} right]] Show Solution
Here is the graph for this function.
In this case we still have a relative and absolute minimum of zero at (x = 0). We also still have an absolute maximum of four. However, unlike the first example this will occur at two points, (x = - 2) and (x = 2).
Again, the function doesn’t have any relative maximums.
As this example has shown there can only be a single absolute maximum or absolute minimum value, but they can occur at more than one place in the domain.
Example 3 Identify the absolute extrema and relative extrema for the following function. [fleft( x right) = {x^2}] Show Solution
In this case we’ve given no domain and so the assumption is that we will take the largest possible domain. For this function that means all the real numbers. Here is the graph.
In this case the graph doesn’t stop increasing at either end and so there are no maximums of any kind for this function. No matter which point we pick on the graph there will be points both larger and smaller than it on either side so we can’t have any maximums (of any kind, relative or absolute) in a graph.
We still have a relative and absolute minimum value of zero at (x = 0).
So, some graphs can have minimums but not maximums. Likewise, a graph could have maximums but not minimums.
Example 4 Identify the absolute extrema and relative extrema for the following function. [fleft( x right) = {x^3}hspace{0.25in}{mbox{on}}hspace{0.25in}left[ { - 2,2} right]] Show Solution
Here is the graph for this function.
This function has an absolute maximum of eight at (x = 2) and an absolute minimum of negative eight at (x = - 2). This function has no relative extrema.
So, a function doesn’t have to have relative extrema as this example has shown.
Example 5 Identify the absolute extrema and relative extrema for the following function. [fleft( x right) = {x^3}] Show Solution
Again, we aren’t restricting the domain this time so here’s the graph.
In this case the function has no relative extrema and no absolute extrema.
As we’ve seen in the previous example functions don’t have to have any kind of extrema, relative or absolute.
Example 6 Identify the absolute extrema and relative extrema for the following function. [fleft( x right) = cos left( x right)] Show Solution
We’ve not restricted the domain for this function. Here is the graph.
Cosine has extrema (relative and absolute) that occur at many points. Cosine has both relative and absolute maximums of 1 at
[x = ldots - 4pi , - 2pi ,0,2pi ,4pi , ldots ]
Cosine also has both relative and absolute minimums of -1 at
[x = ldots - 3pi , - pi ,pi ,3pi , ldots ]
As this example has shown a graph can in fact have extrema occurring at a large number (infinite in this case) of points.
We’ve now worked quite a few examples and we can use these examples to see a nice fact about absolute extrema. First let’s notice that all the functions above were continuous functions. Next notice that every time we restricted the domain to a closed interval (i.e. the interval contains its end points) we got absolute maximums and absolute minimums. Finally, in only one of the three examples in which we did not restrict the domain did we get both an absolute maximum and an absolute minimum.
These observations lead us the following theorem.
Extreme Value Theorem
Suppose that (fleft( x right)) is continuous on the interval (left[ {a,b} right]) then there are two numbers (a le c,d le b) so that (fleft( c right)) is an absolute maximum for the function and (fleft( d right)) is an absolute minimum for the function.
So, if we have a continuous function on an interval (left[ {a,b} right]) then we are guaranteed to have both an absolute maximum and an absolute minimum for the function somewhere in the interval. The theorem doesn’t tell us where they will occur or if they will occur more than once, but at least it tells us that they do exist somewhere. Sometimes, all that we need to know is that they do exist.
This theorem doesn’t say anything about absolute extrema if we aren’t working on an interval. We saw examples of functions above that had both absolute extrema, one absolute extrema, and no absolute extrema when we didn’t restrict ourselves down to an interval.
The requirement that a function be continuous is also required in order for us to use the theorem. Consider the case of
[fleft( x right) = frac{1}{{{x^2}}}hspace{0.25in}{mbox{on}}hspace{0.25in}[ - 1,1]]
Here’s the graph.
This function is not continuous at (x = 0) as we move in towards zero the function is approaching infinity. So, the function does not have an absolute maximum. Note that it does have an absolute minimum however. In fact the absolute minimum occurs twice at both (x = - 1) and (x = 1).
If we changed the interval a little to say,
[fleft( x right) = frac{1}{{{x^2}}}hspace{0.25in}{mbox{on}}hspace{0.25in}left[ {frac{1}{2},1} right]]
the function would now have both absolute extrema. We may only run into problems if the interval contains the point of discontinuity. If it doesn’t then the theorem will hold.
We should also point out that just because a function is not continuous at a point that doesn’t mean that it won’t have both absolute extrema in an interval that contains that point. Below is the graph of a function that is not continuous at a point in the given interval and yet has both absolute extrema.
This graph is not continuous at (x = c), yet it does have both an absolute maximum ((x = b)) and an absolute minimum ((x = c)). Also note that, in this case one of the absolute extrema occurred at the point of discontinuity, but it doesn’t need to. The absolute minimum could just have easily been at the other end point or at some other point interior to the region. The point here is that this graph is not continuous and yet does have both absolute extrema
The point of all this is that we need to be careful to only use the Extreme Value Theorem when the conditions of the theorem are met and not misinterpret the results if the conditions aren’t met.
In order to use the Extreme Value Theorem we must have an interval that includes its endpoints, often called a closed interval, and the function must be continuous on that interval. If we don’t have a closed interval and/or the function isn’t continuous on the interval then the function may or may not have absolute extrema.
We need to discuss one final topic in this section before moving on to the first major application of the derivative that we’re going to be looking at in this chapter.
Fermat’s Theorem
If (fleft( x right)) has a relative extrema at (x = c) and (f'left( c right)) exists then (x = c) is a critical point of (fleft( x right)). In fact, it will be a critical point such that (f'left( c right) = 0).
To see the proof of this theorem see the Proofs From Derivative Applications section of the Extras chapter.
Also note that we can say that (f'left( c right) = 0) because we are also assuming that (f'left( c right)) exists.
This theorem tells us that there is a nice relationship between relative extrema and critical points. In fact, it will allow us to get a list of all possible relative extrema. Since a relative extrema must be a critical point the list of all critical points will give us a list of all possible relative extrema.
Consider the case of (fleft( x right) = {x^2}). We saw that this function had a relative minimum at (x = 0) in several earlier examples. So according to Fermat’s theorem (x = 0) should be a critical point. The derivative of the function is,
[f'left( x right) = 2x]
Sure enough (x = 0) is a critical point.
Be careful not to misuse this theorem. It doesn’t say that a critical point will be a relative extrema. To see this, consider the following case.
[fleft( x right) = {x^3}hspace{0.25in}hspace{0.25in}f'left( x right) = 3{x^2}]
Clearly (x = 0) is a critical point. However, we saw in an earlier example this function has no relative extrema of any kind. So, critical points do not have to be relative extrema.
Also note that this theorem says nothing about absolute extrema. An absolute extrema may or may not be a critical point.
Before we leave this section we need to discuss a couple of issues.
First, Fermat’s Theorem only works for critical points in which (f'left( c right) = 0). This does not, however, mean that relative extrema won’t occur at critical points where the derivative does not exist. To see this consider (fleft( x right) = left| x right|). This function clearly has a relative minimum at (x = 0) and yet in a previous section we showed in an example that (f'left( 0 right)) does not exist.
What this all means is that if we want to locate relative extrema all we really need to do is look at the critical points as those are the places where relative extrema may exist.
Absolute Minimum Math
Finally, recall that at that start of the section we stated that relative extrema will not exist at endpoints of the interval we are looking at. The reason for this is that if we allowed relative extrema to occur there it may well (and in fact most of the time) violate Fermat’s Theorem. There is no reason to expect end points of intervals to be critical points of any kind. Therefore, we do not allow relative extrema to exist at the endpoints of intervals.
Tumblr media
0 notes
Text
Mycroft Holmes submission form that i will probably regret doing in the cold sober light of day
Name: Cat(herine)
Age: 19
Highest level of education: BA (currently doing first year)
Occupation: Student. Apprentice/novice historian
Height: 5’ 1"
Gender: Female
Noteworthy Skill sets: lots of acting experience (been doing it since I was 4) and in writing, large vocabulary, good memory. My judgement calls tend to also pay off, but maybe that’s just luck. 
Negative aspects: I’m a massive worrier. I’m quite lazy. Shy. Cautious. Cynical. I find it quite hard to stand up for myself, especially with family members.  I have to consciously make myself have any kind of social life. I also write very detailed answers to submission forms.
And now I’ve just overshared. G r e a t.
Languages spoken: Conversational French and Spanish, but very rusty. My German is even rustier. I have a incy wincy bit of Ancient Greek. I don’t speak Latin, but I like learning to read it.
Best academic subject: Classics or History
Favorite academic subject: H I S T O R Y 
Worst academic subject: Geography? Some parts were interesting but it just never struck a spark. Also maths when it involves shapes and graphs. Arithmetic and mental maths and probability, I’m good with but all the graph translations and areas and curves….nope.
Level of fitness: I am really quite puny. I have plenty of stamina and I can swim (my diving is embarrassing though) but I have no muscle strength or flexibility at all. My BMI is healthy, though.
Feline, canine or both: feline
How would you rate your IQ: tests tend to put it 150-155. Where would I rate it? ehhh unless I’m very self-aware I couldn’t pinpoint it with accuracy, so. 
On a scale of 1 to 5 (with 1 being low and 5 being the highest) how would you rate your self-confidence? ____3.59__today, because I’m in a good mood
Would you say that you lean more to intellectual intelligence, intuitive intelligence or somewhere in between: Personally or in other people? Personally I’d say… intellectual.
Name the last book you read: For study or for fun? I’ll assume fun. Quiet by Susan Cain and I Claudius by Robert Graves. 
Please bold all that apply to the sentence below.
I want to ________with Mycroft Holmes.
A)  have a meaning friendship
B) have a successful mentorship
C) have a romantic relationship
D) have his babies and grow old- deep down in my wish fulfilment heart of hearts, only I’ve got to be realistic
Knowledge portion:
Solve the problems without cheating and bold your answers.
Consider the functions f(x)=
. In standard (x, y) coordinate plane, y + f(g(x)) passes through (4,6). What is the value of b? __I’ve got up to 6=f(28+b) and f(4)= +2 or -2. Now I’m stuck._______
The closest star to the sun is Proxima Centauri. IN which direction would we need to look in order to see it in the night sky? __I know that the earth goes round the sun!__________
What is the name of the galaxies grouped to which the Milky Way belongs? _Nestle galaxies. I don’t know._________
The treaty of Frankfart was signed 10 May 1871 between which two countries?
France and Prussia. It was a peace treaty. Germany and Italy were still very young countries at this point, in terms of being unified nations.
Missing angles
OK, so the other angles in the yellow triangle are 45 degrees and 90 degrees. The area of a triangle is half base times perpendicular height. All angles in a triangle must add up to 180 degrees. Maybe you could use, the sine, cosine and tangent rules to get the answer but I’m stuck again. Oh and the square of the hypotenuse is equal to the sum of the squares of the other two sides.
Genetic evidence shows that people with whom a majority of teh population of Briatin share the closest genetic link are:
Germans?
Certainly the Anglo-Saxons, given that the Saxon part comes from Saxony in Germany. Depends on the region I suppose.  The northern parts had the “danelaw” because they were settled by vikings.
How long did the “Hundred Year War” last between England and France?
116 years!
What is the heaviest breed of bear?
Polar bear?
Koala bears are small and polar bears live in colder regions than black bears so they probably have more fat which makes them heavier?
When grilling , where does the heat source come from?
Electricity. I don’t know.
How many of the original 51 Member States of the Untied Nations are still members under their original names?
C) 43
Mostly because of the impact of the break up of original member state USSR and the end of the Cold War. Yugoslavia broke up (messily) in the 1990s. Czechoslovakia split to become Czech Republic and Slovakia. 
Don’t know what the art is from. Looks Greco-Roman but in good condition so maybe Georgian? I appreciate it aesthetically, at least.
Counterpoint? 5th species counterpoint? What are species doing in music, I thought they were biology? basic error? w h a a a a atttttt
I only know basic music like treble clefs and minims and crotchets and beats in a bar. I don’t even know where to begin ha.
In my defense, there weren’t any literature or classics questions on this knowledge test. And hardly any history questions.  
Mycroft's Answer:
You're a bit  hard to pin down but you have great promise for improvement given enough time and clemency.  Mycroft loves scholars and will 'shoot the breeze' so to impart knowledge on his favorite subjects with just about anyone will to suffer him. As long as you can keep up with his intellectual pursuits you should be fine.
have a meaning friendship : 7/10
have a successful mentorship: 9/10
 have a romantic relationship: 6/10 (at least until you hit 21)
have his babies and grow old: 6/10 (at least until you hit 21)
3 notes · View notes