I have implemented Maximum-entropy Markov model (MEMM) for the Named entity recognition (NER) problem. I have four classes: geographical, people, material (book titles etc) and other.  Class other is overrepresented in the training &amp; test datasets. It occurs 88% (about 40k samples) of the time.  I'm sure other authors must have had this problem. How do you suggest I go about solving this problem?  EDIT: A single data sample is a whole tagged sentence. Most of the sentence is tagged as other. I'm guessing the resampling techniques won't work here? Do you suggest I use single tokens for training dataset, instead of whole sentences?  EDIT 2: In response to my post being a duplicate: you do realize you've linked to a question that was asked 2 years after mine, right?
This is a question in general, not specific to any method or data set. How do we deal with a class imbalance problem in Supervised Machine learning where the number of 0 is around 90% and number of 1 is around 10% in your dataset.How do we optimally train the classifier.  One of the ways which I follow is sampling to make the dataset balanced and then train the classifier and repeat this for multiple samples.   I feel this is random, Is there any framework to approach these kind of problems.
Updating the SubscriberKey on the All Subscriber table through the API I'm trying to update an existing Subscriber in the All Subscriber Table through the API; i've set up the AppId in the App Center and have connected and created Subscribers, but i'm still having issues updating.  What call do I need to be making to do this? These are the ones i've been trying. Conveying "under the radar" in a less colloquial way I am searching for a word to contrast with iconic  I want to characterize views of the city as both iconic and under the radar, maybe "non-iconic."  I was thinking about saying that a view of the city was undiscovered, but I think that maybe that overstates what I'm think-- I more mean under-appreciated. Are there any other words that come to mind? I am trying to define the probability distribution of $Z$ such as $Z = X_1\cdot X_2$ where $X_1$ and $X_2$ are two independent and identically exponentially distributed variables.  $$P(X_1=x) = \lambda e^{-\lambda x}$$ $$P(X_2=x) = \lambda e^{-\lambda x}$$  I tried something like that….  $$P(Z=x) = P(X_1 = a) \cdot P(X_2 = x/a)$$  Is this first equation correct?  $$P(Z=x) = \lambda e^{-\lambda a} \cdot \lambda e^{-\lambda x/a} = \lambda^2 e^{-\lambda (a+x/a)}$$  I doesn't feel like I found the solution as the dummy variable $a$ remains in the final result. Can you please help me solving this problem? Why do I get TypeError: can't multiply sequence by non-int of type 'float'? I am typing to get a sale amount (by input) to be multiplied by a defined sales tax (0.08) and then have it print the total amount (sales tax times sale amount).  I run into this error. Anyone know what could be wrong or have any suggestions?   salesAmount = raw_input (["Insert sale amount here \n"]) ['Insert sale amount here \n']20.99 &gt;&gt;&gt; salesTax = 0.08 &gt;&gt;&gt; totalAmount = salesAmount * salesTax  Traceback (most recent call last):   File "&lt;pyshell#57&gt;", line 1, in &lt;module&gt;     totalAmount = salesAmount * salesTax TypeError: can't multiply sequence by non-int of type 'float' Symmetric powers of modules float to int unexpected behaviour Listings: text highlighting based on prefix How can I apply different styles to keywords depending on their prefix?  Here is some sample code:  (-2,0,0) (2,1,1) op-registerbox !box1 ;box1 /Blue op-setproperties   I'd like to typeset   words starting with ! and ; in color red, words starting with / in color green, words starting with cp- in bold.   So far, this is what I've got:  \lstdefinelanguage{XX} { basicstyle=\small\sffamily\fontseries{c}, emphstyle=\underbar, keywordsprefix=[2]{/}, alsoletter={/}, keywordstyle=\textbf, keywordstyle=[2]\color{green}, morekeywords={op,registerbox, ...}, morestring=[b][\color{green}]", columns=flexible, escapechar=\%, numbersep=6pt, numberstyle=\scriptsize }   I'm aware that only one keywordsprefix can be defined at the moment: specifying more than one class of prefix (keywordsprefix=[2]{/}) is currently not supported. I'd like to avoid having to list all the words that match my description into morekeywords. Is that possible? How? Let $V,W$ be nonzero normed spaces over $\mathbb{K}$ such that $V$ is finite-dimensional.  Let $E$ open in $\mathbb{K}$ and $p\in E$.  Let $f:E\rightarrow W$ be Gâteaux-differentiable at $p$.  Is $f$ necessarily Fréchet-differentiable at $p$ in this case?  I think this is not true in general, but cannot find a counterexample. What would be a counterexample? I  have had no luck getting the buffer tool to accept anything but degrees as units of measure.  I have found lots of stuff saying the layer needs to be reprojected and saved but it hasn't worked at all for me.   Is there a way I could create a buffer without using ftools or at least force the units to meters somehow?  As a workaround I converted meters to degrees (lat) and used that but the final product needs to be as close to reality as possible.  Things I've tried:   setting every unit option I could find to meters (where possible). setting everything to NAD83/Maryland (data is for Washington, DC) and saving it as such (as layers in ESRI shape files). reimporting the reprojected layers setting relevant layers to Google Mercator   The was tried followed by creating a buffer. Many were tried in combination. QGIS 1.7.3 Slackware64 current (qgis from SBo-13.37 repo, tried on multilib and plain 64it with same results) Override a method via ObjC Category and call the default implementation? How do I delete multiple rows in Entity Framework (without foreach) Saving high-quality graphics through commands I know that python has a len() function that is used to determine the size of a string, but I was wondering why it's not a method of the string object.  Update  Ok, I realized I was embarrassingly mistaken. __len__() is actually a method of a string object. It just seems weird to see object oriented code in Python using the len function on string objects. Furthermore, it's also weird to see __len__ as the name instead of just len. Ubuntu can't be installed on my system because of what the title says. This is because support Intel HD Graphics 530 was only just added in Linux kernel 4.3 and all versions of Ubuntu only have kernel versions up to 4.2 as of 15.10. My computer's processor is the new Intel Skylake 6600K if you need to know, everything else is generic. It has a UEFI BIOS motherboard. Help? Prove $\int\cos^n x \ dx = \frac{1}n \cos^{n-1}x \sin x + \frac{n-1}{n}\int\cos^{n-2} x \ dx$ I am trying to prove  $$\int\cos^n x \ dx = \frac{1}n \cos^{n-1}x \sin x + \frac{n-1}{n}\int\cos^{n-2} x \ dx$$  This problem is a classic, but I seem to be missing one step or the understanding of two steps which I will outline below.   $$I_n := \int\cos^n x \ dx = \int\cos^{n-1} x \cos x \ dx \tag{1}$$  First question: why rewrite the original instead of immediately integrating by parts of $\int \cos^n x \ dx$?  Integrate by parts with $$u = \cos^{n-1} x, dv = \cos x \ dx \implies du = (n-1)\cos^{n-2} x \cdot -\sin x, v = \sin x$$  which leads to  $$I_n = \sin x \ \cos^{n-1} x +\int\sin^2 x (n-1) \ \cos^{n-2} x \ dx \tag{2}$$  Since $(n-1)$ is a constant, we can throw it out front of the integral:  $$I_n = \sin x \ \cos^{n-1} x +(n-1)\int\sin^2 x \ \cos^{n-2} x \ dx\tag{3}$$  I can transform the integral a bit because $\sin^2 x + cos^2 x = 1 \implies \sin^2 x = 1-\cos^2 x$  $$I_n = \sin x \ \cos^{n-1} x + (n-1)\int(1-\cos^2 x) \ \cos^{n-2} x \ dx \tag{4}$$  According to Wikipedia as noted , this simplifies to:  $$I_n = \sin x \ \cos^{n-1} x + (n-1) \int \cos^{n-2} x \ dx - (n-1)\int(\cos^n x) \ dx \tag{5}$$  Question 2: How did they simplify the integral of $\int(1-\cos^2 x) \ dx$ to $\int(\cos^n x) \ dx$?  Assuming knowledge of equation 5, I see how to rewrite it as  $$I_n = \sin x \ \cos^{n-1} x + (n-1) I_{n-2} x  - (n-1) I_{n} \tag{6}$$  and solve for $I_n$. I had tried exploiting the fact that  $$\cos^2 x = \frac{1}{2} \cos(2x) + \frac{1}{2} $$  and trying to deal with $\int 1 \ dx - \int \frac{1}{2} \cos (2x) + \frac{1}{2} \ dx$  which left me with $\frac{x}{2} - \frac{1}{4} \sin(2x)$ after integrating those pieces. Putting it all together I have:  $$I_n = \sin x \ \cos^{n-1} x + (n-1) I_{n-2} x \left(-(n-1) (\frac{x}{2} - \frac{1}{4} \sin 2x) \right) \tag{7}$$  but I'm unsure how to write the last few terms as an expression of $I_{something}$ to get it to match the usual reduction formula of   $$\int\cos^n x \ dx = \frac{1}n \cos^{n-1}x \sin x + \frac{n-1}{n}\int\cos^{n-2} x \ dx$$ How do I get my PCs to not be a bunch of murderous cretins? Most RPGs teach you that casual violence is the best solution to all your in-game problems. This is so well established a part of the vast majority of RPGs that there are entire satire RPGs like Greg Costikyan's  and John Tynes'  dedicated to showcasing the issue. Even now that the '80's anti-RPG hysteria is past, you see more sober critiques of endemic violence in RPGs in places like . In most RPGs, PCs become inured to murder and other antisocial activities very quickly, and enter the depths of depravity that wouldn't be appropriate in the worst parts of the world. Armed robbery, mass murder, and genocide become routine parts of an adventurer's day, something only stick-in-the-mud characters with the most extremely stated ethics object to. , even though it is not properly applied to just any conflict, is a PC's friend and they generally escalate any conflict in that direction. The sophistication of the gamer mindset towards introspection on this issue can be demonstrated in that the most meaningful question usually debated about in-game violence is some variant on &quot;but should we kill the noncombatant children&quot; or &quot;can we just murder people out of hand as long as they're from a typically evil race?&quot; In the real world, we generally a priori regard anyone having to have this discussion as a monster already. (P.S. The &quot;wipe out a given evil race&quot; thing isn't the point of this question; it is only mentioned to indicate that it's only &quot;that far&quot; that usually causes ethical handwringing from players, when that is a really quite extreme case and we should be uncomfortable with casual violence a lot sooner. ) What I'd like to have is a more realistic in-game treatment of conflict.  People getting wounded and giving up, taking and ransoming of prisoners, not always escalating a fistfight to weapons, not always escalating weapon combat to killing, etc.  Heck, as I write this, I'm watching an episode of Adventure Time with my daughter and the protagonists snuck in and rescued a princess kidnapped by the Ice King and then exit right next to his sleeping form. I thought, &quot;If this were D&amp;D they'd all be carefully coordinating a coup de grace to kill him in his sleep on the grounds that he inconvenienced them.&quot;  The problem isn't limited to D&amp;D of course, sci-fi PCs are happy to neutron bomb planets for convenience too, for example. I'm not part of the &quot;D&amp;D is Satanic&quot; crowd obviously, but I frankly do have compunctions about continually playing in games where the taught behavior is uncomfortably equivalent to the worst examples of human behavior we see on the nightly news. How can I give my PCs a newfound respect for human life? Where can I find computer modern fonts for use in other programs, e.g. Adobe Illustrator? I just enabled the Blenderkit addon but cannot seem to figure out how to edit the objects. I looked in this reddit thread and amazingly none of the solutions worked for me.  Making it a single user object, data, and materials did not work. I do not see any option to append when adding a model form the Blenderkit asset bar (I even tried saving it and appending the object in another instance of Blender and it still would not let me edit it). And when I right click I do not see an option to make local on outliner collection. I am using Blender 2.83 if that makes a difference but can use 2.9 if need be. Any other solutions? We had a small widget that allowed customers to share records that were set to a private sharing model in our community. Everything was rather simple and it would simply allow them to select users that were visible via Sharing Sets and create an __Share record in APEX.  I've been reported recently that an error is thrown but only on the community side of things. Nothing seems to be working where it was working. We are using    Customer Community Plus licenses.  The error being thrown is : System.TypeException: DML operation INSERT not allowed on &lt;Object&gt;__Share which seemed to indicate access not available on the object. That seems odd because they are able to interact with the object just fine in order to create/edit/delete them.  I looked up the Sharing Model (its private both internally and externally), I looked at the profile and their access and the sharing sets in the community. Like I said, they seem to interact fine with the objects when it comes to seeing the records and their right.  Additionally, standard license users can use the component fine and also share with community users without a problem. They also see the records as expected.  Am I missing an update or something that seem to make it so this doesn't work anymore? Anyone having trouble with this or encountered the same problem? I get this warning:     Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release   What does it mean?