Why P>0.5 cutoff is not "optimal" for logistic regression?
How do you report percentage accuracy for glmnet logistic regression?
Crash with error "No more room to grow table" css background color with floating elements PrintWriter and PrintStream never throw IOExceptions Some days ago I realized that  (as well as ) never throw an IOException when writing, flushing or closing.  Instead it sets an internal flag (trouble=true) when an error occurs. It's not possible to get the exact exception, but only if there was some exception ().  My question is: why would one want to have such behavior? Isn't that bad API design? Google Spreadsheets: IF not working I have problems with my IF command in Google Sheets. If gives #ERROR! all the time. See this simple test:    Not even if I put in the number directly and avoid references:    Am I using the IF wrong? Or what could such a problem be? This example is from a new document. Can I have my sudo/su password different from my desktop login password? We have various ways of invoking apex. Triggers, Inbound Webservices, @InvocableMethod,@RemoteAction and what not. Often we call some or other utility methods from these execution contexts. I have some generic utility method,that should behave differently from the context it is called?  I know about Trigger.isExecuting but it only tells if its running in trigger context or not.  I have a utility method that creates lead from Webservices, VF button click and via Lightning . Whenever we create a lead I want some special operations to be done via the source it was originated.(Its not just updating a simple field leadSource, I have some methods that creates some childs and update other records of other type) . I can achieve this by passing an extra parameter to utility method to tell about source, but i have then to edit hundred of other class that uses this utility method. If i could dynamically find out via which context this piece of code is running,then i would have to change only one class to satisfy my requirement.    Is there something in APEX that tells in what context the apex method was called? Why do the :before and :after pseudo-elements require a 'content' property? What do the different colors mean in ls? What do the different colours in Ubuntu's ls command mean? For example, when I type the ls command in one of my folders, I get one of the files in light green, the other (which is a folder) in blue with green highlighting.   What do those colours mean, and there is any manual about all the colours? block all but a few ips with firewalld On a linux  networked machine,  i would like to restrict the set of addresses on the "public" zone  (firewalld concept), that are allowed to reach it. So the end result would be no other machine can access  any port or protocol, except those explicitly allowed, sort of a mix of     --add-rich-rule='rule family="ipv4" source not  address="192.168.56.120" drop'    --add-rich-rule='rule family="ipv4" source not  address="192.168.56.105" drop'   The problem above is that  this is not a real list, it will block everything since if its one address its blocked by not being the same as the other, generating an accidental "drop all" effect,  how would i  "unblock" a specific non contiguous set? does source accept a list of addresses? i have not see anything in my look at the docs or google result so far.     EDIT: I  just  created this:  # firewall-cmd  --zone=encrypt --list-all encrypt (active)   interfaces: eth1   sources: 192.168.56.120   services: ssh   ports: 6000/tcp   masquerade: no   forward-ports:    icmp-blocks:    rich rules:    But i can still reach port 6000 from  .123   my intention was that   if a source is not listed, it should not be able to reach any service or port $n^2 + 3n +5$ is not divisible by $121$ Question:  Show that $n^2 + 3n + 5$ is not divisible by $121$, where $n$ is an integer. I am working to build a reinforcement agent with DQN. The agent would be able to place buy and sell orders for a day trading purpose. I am facing a little problem with that project. The question is "how to tell the agent to maximize the profit and avoid the transaction where the profit is less than 100$".  I want to maximize the profit inside a trading day and avoid to place the pair (limit buy order, limit sell order) if the profit on that transaction is less than 100$. The idea here is to avoid the little noisy movements. Instead, I prefer long beautiful profitable movements. Be aware that I thought using the "Profit &amp; Loss" as the reward.  "I want the minimal profit per transaction to be 100$" ==> It seems this is not something that is enforceable. I can train the agent to maximize profit per transaction, but how that profit is cannot be ensured.  At the beginning, I wanted to tell the agent, if the profit of a transaction is 50 dollars, I will remove 100 dollars, then It becomes a penalty of 50 dollars for the agent. I thought it was a great way to tell the agent to not place a limit buy order if you are not sure it will give us a minimal profit of 100$. It seems that all I would be doing there is simply shifting the value of the reward. The agent only cares about maximizing the sum of rewards and not taking care of individual transactions.   How to tell the agent to maximize the profit and avoid the transaction where the profit is less than 100$? With that strategy, what guarantee that the agent will never make a buy/sell decision that results in less than 100 dollars profit? Does the sum of reward - # transaction * 100 can be a solution? Equation left margin I want to prove that $xe^{-x}$ is bounded by some constant for all the $x \in [0, \infty)$. So I take derivative of this guy, and found that on $x \in [0, \infty)$, its derivative is positive from $[0, 1)$, $0$ at $x=1$, and negative from (1, in infinity). So  $xe^{-x}$ achieves its maximum in $[0, \infty)$ at $x=1$, which is $1/e$. However, to prove that it's bounded by $1/e$, I need to prove that as $x$ goes to infinity, $xe^{-x}$ converges to $0$. Because otherwise, if it went to some value below $(-1/e)$, $xe^{-x}$ would not be bounded by $1/e$. How can I prove that $xe^{-x}$ converges to $0$? I mean, as $x$ goes to infinity, $e^{-x}$ converges to zero, but at the same time, x diverges to infinity. How can I formally prove that the product term converges to $0$? Do I need to use the epsilon definition of convergence to prove it?  Could you just show me the formal proof of $xe^{-x}$ converges to $0$? Or is there's any other way to approach this question? My professor suggested that I should use the power series for $e^{-x}$...?   Your help is greatly appreciated! Thank you so much!  I hope you enjoy your Saturday! $z$ is a complex number, by the way.  I've tried a lot of things and always end up with a huge algebraic mess and I've wondered if anyone of you has any idea on how to approach this problem.  One of the most "satisfactory" things I've done so far is to expand both the real and imaginary parts for the equation \vert z + 1/z \vert^2 = a^2. These parts yield the constraints:  $2xy(1+1/(x^2+y^2)^2)=0$ ;   $x^2-y^2+\frac{2(x^2-y^2)}{x^2+y^2}+\frac{(x^2-y^2)}{(x^2+y^2)^2}=a^2 $  I've graphed the equations and supposedly the intersection should be my set of points, but this method is far from analytical.  What can I do? Any hints on how to approach this? I'll like to add this functionality to the autocomplete widget in Entityreference field to show node ID next to the titles in the dropdown list. The reason behind the idea is to differentiate between multiple nodes with same title.  Example:    This is a title (3) This is a title (2) This is a title (1)   I know the node ID is shown once a selection is made but I like to show it in the dropdown list in order to pick the right node quickly based on the node ID. Is  structured data (in Microdata, JSON-LD, or RDFa) relevant for SEO?   I know that structured data can provide benefits in other areas, but here I’m only asking about its significance for general web search engines. limit of $\lim\limits_{x \to \infty}((x+1)^a - x^a)$ Hello everybody, i couldn't figure out how to demonstrate this equation without L'Hopital i wonder if its possible.   $a \in (0,1)$ $\lim\limits_{x \to \infty}((x+1)^a - x^a) = 0$ Is there an uncountable family of infinite parts of $\mathbb N$ with two to two intersection finite? How many questions on meta have asked, "Why can't I ask this question when that question is open"? How Do You Select Only Part Of a Timeline To Be Rendered? Let's say I only want a section of the timeline to be rendered, and I want the final output to be in RAW AVI format.  How would you do that? Thanks guys!