I am training a triplet loss based classification network and a normal multiclass classification network on some image data. In my case, the triplet loss network performs worse than the multiclass network. I have tried changing layers, neurons, margin, etc. for the triplet loss network, but the multiclass network still performs better. Are there any cases where the triplet loss network can perform worse than normal multiclass classification? If no, what are the possible things I can look at to …
I am trying to create custom admin widget to present how many users has registered within last days. I have created function as below: function mdbootstrap_add_dashboard_recent_users(){ global $wpdb; $query = " SELECT count(*) as counter, DATE(wp_users.user_registered) as regdate FROM wp_users GROUP BY DATE(wp_users.user_registered) ORDER BY DATE(wp_users.user_registered) desc"; $posts = $wpdb->get_results($query,OBJECT); print_r( $posts); } However for some reason it's returning only 2 rows: Array ( [0] => stdClass Object ( [counter] => 1 [regdate] => 2016-01-12 ) [1] => stdClass Object …
I have a wp_query that uses tax_query to which I pass an array of taxonomy term IDs. I'd like to order my results based on the order of that array but can't get it to work and searching has got me nowhere. Example code below for reference. So this code actually orders the results by tax terms (dumb luck?) but the tax terms aren't in the same order as $term_array. I've tried all the logical options for the 'orderby' parameter …
WP multisite network based on subdomains, and domain mapping to my customer domain names without a plugin (I'm on WP 4.6.x). SSL cert for the server, so the base network domain does come up with green padlock -- but I do not cover my customer's domains - they currently get forced to http. I need to have all my customer's domains come up with https, green padlock -- without having to install a separate SSL cert for each domain. What …
I would like to reduce multiclass classification targets to binary classification targets. Ideally, this mapping would happen within scikit-learn so the same transformation applies during both training and prediction. I looked at transforming the prediction target (y) documentation but did not see something that would work. Ideally, it would be a classifier version of TransformedTargetRegressor. Something like this mapping: targets_multi = {'A', 'B', 'C', 'D'} targets_binary = {0: {'A', 'B'}, 1: {'C', 'D'}}
I have the problem: I understood how GAN works in general, but I need information how it work detailed. The part I don't understand is how the random noise at input is transformed to data on the output(the math side of that process). If anybody knows answer for the question please say it or at least say in which side I need google the question.
I'm new to WP plugin programming but have been tasked with the following. GOAL: Create a plugin that does all the following: Set up default chat departments for each domain. Create custom field using select dropdown to allow choosing alternate chat department for each page. Create custom column in Quick Edit to show selected chat department. Column must be sortable. Allow selection of alternate chat department on each page via Quick Edit screen (and optionally via regular edit screen which …
I have two datasets both of the form from the table below. I am interested in downselecting from dataset A by sampling from the distribution of values from dataset B. However, I want to consider both the Distance and Duration when downselecting such that the distribution of both parameters in my end-product from dataset A matches as best as possible the distribution of these parameters from dataset B. Anyone have suggestions for tools (preferably in python) that would help me …
I am writing a plugin and I need to use the update_option function to update an array I have stored as an option in WP. For the admin panel I used the settings API but for this portion I need to use the update_option directly. I have simplified my code so all it is currently doing is reading in the option, adding an element to the returned array, and updating the option with the modified array. But when I read …
I have a lot of time series with different lengths. I would like to know what are the best practices to fit them to a Bidirectional LSTM model. The problem is a Binary Classification of Sequence to Sequence. So for every time step, I want to predict the binary class. Currently, I create a tensor for each data frame with the shape of (1, None, #Features). Then I fit every tensor separately to the model. Is it better to combine …
Working on a forecast model that should output an End of monthly value, the interesting part is that we already have partial (90%) of that data available at the prediction point (max 30 days away). The purpose is to take into account the current monthly trend and project that out until the end of the month, but also take into consideration that we already know those future points with 90% confidence. For example: Let's say we're in the 3rd day …
Hello I have multi author website. I want to display all comments of posts created by author in author page. Please help me. I found this code but fatal error <?php $args = array( 'author' => AUTHOR_ID, 'posts_per_page' => 500, //Don't use -1 here ); $the_query = new WP_Query( $args ); if($the_query->have_posts() ) : ?> <?php while ( $the_query->have_posts() ) : ?> <?php $nested_args = array( 'post_id' => get_the_ID() ); $comments_query = new WP_Comment_Query; $comments = $comments_query->query( $nested_args ); if …
While using support vector machines (SVM), we encounter 3 types of lines (for a 2D case). One is the decision boundary and the other 2 are margins: Why do we use $+1$ and $-1$ as the values after the $=$ sign while writing the equations for the SVM margins? What's so special about $1$ in this case? For example, if $x$ and $y$ are two features then the decision boundary is: $ax+by+c=0$. Why are the two marginal boundaries represented as …
Just to set the scene I have a client that has a wordpress site with a mixture of "static" pages and woocommerce shop. The product catalogue has approx "86,000" products in it. This number may include variation though it is massive. The client relies heavily on product filtering functionality for users to get to the correct products. Using WP AJAX to do this has proven really slow. After a bit of research I think the best way to perform the …
I am interested in changing our WP dashboard so that I can choose whether an individual Post will include the publish date or not. Is there a way to do it without a plug-in and insert code that maybe creates a checkmark or something like that in the Post dashboard that can toggle the publish date display? Thank you in advance!
Dear StackExchange community, I am struggling with the following problem and simply cannot find a solution: I have installed a SSL certificate but it causes the CSS of my website to break when the plug-in "W3TC" is activated (example: https:// www.planetofsuccesscom/blog/). Here's how I installed the certificate and how I tried fixing the problem: Deactivated W3TC Updated my site URL to https within the WordPress dashboard (Settings » General and updating your WordPress and site URL address fields) Redirected http …
I have a dataset with following data format: 3 -> a -> b -> c -> d -> ikd a -> c -> 3 -> dk -> 2 -> l2i Each row represents a path from start to end. Let's take the first row as an example. The start point is 3 and the endpoint is ikd. I have millions of rows like that. And each row may have a different length. What I want to do is let users …
I am working on a model which will run monthly on 8M users. I've snapshot-wise data in training set, eg: Jan, 21 Snapshot : 8M Total : 233 Positives Rest Negative Feb, 21 Snapshot : 8M Total : 599 Positives Rest Negative March, 21 Snapshot : 8M Total : 600 Positives Rest Negative April, 21 Snapshot : 8M Total : 750 Positives Rest Negative similarly till March, 2022 I'm keeping March, 2022 as test set, which has 2000 positive labels …
I have been looking for an answer for a few days digging through hooks and actions. I just cane seem to find a way to turn down the strength on the reset password page not sure if its through woo-commerce or WP I have tried the following add_filter( 'woocommerce_min_password_strength', 'reduce_woocommerce_min_strength_requirement' ); function reduce_woocommerce_min_strength_requirement( $strength ) { return 2; } add_filter( 'wc_password_strength_meter_params', 'reduce_strength_meter_settings' ); function reduce_strength_meter_settings( $data ) { return array_merge( $data, array( 'min_password_strength' => 2, 'i18n_password_hint' => 'Change Hint here' …
I have a task where I need to only plot the training loss and not the validation loss of the plot_losses function in the fastai library with learner object having recorder class, but I am not able to properly implement the same. I am using the fastai v1 for this purpose due to project restrictions. Here is the github code for the same: class Recorder(LearnerCallback): "A `LearnerCallback` that records epoch, loss, opt and metric data during training." def plot_losses(self, skip_start:int=0, …
I have referred to various articles on Stack Overflow and external sources but somehow am unable to get answer for this. I would like to read a table from MySQL workbench database into a dataframe in colab. $1^{st}$ Method: In this method, first line of code is successfully executed. Note: I have hidden database, table and password name for security reasons. Source - USER = 'root' PASSWORD = 'PASSWORD' DATABASE = 'DATABASE' TABLE = 'TABLE' connection_string = f'mysql+pymysql://root:PASSWORD/DATABASE' engine = …
I read that a confusion matrix is used with image classification but if I need to draw it with image captioning how to use it or can I draw it in the evaluation model phase for example if yes how can I start?
I am reading The Elements of Statistical Learning and regarding regularized logistic regression it says: "As with the lasso, we typically do not penalize the intercept term" and I am wondering in which situations you would penalize the intercept? Looking at regularization in general, couldn't one think of scenarios where penalizing the intercept would lead to a better EPE (expected prediction error)? Although we increase the bias wouldn't we in some scenarios still reduce the EPE? EDIT It might be …
I don't understand how the calculation score taking out the sentences where the words contribute the most of to the result helps to show to what extent a model is "faithful" to a reasoning process. Indeed, a faithfulness score was proposed by Du et al. in 2019 to verify the importance of the identified contributing sentences or words to a given model’s outputs. It is assumed that the probability values for the predicted class will significantly drop if the truly …
I have a site with many custom queries. Some take many seconds to load a page. To solve that issue, I have been using a caching plugin. The issue is, my caching plugin does not cache a page until I click it once. I'd prefer to do this entire process without a plugin if possible. If the plugin route is the best way to go, I'd love to know that too. I have an idea that this is how it …
As it stands, the Calendar View shows filters for Categories and Venues. I need a 'filter' for text search. We are looking for ability to search by topic, rather than category, for example - otherwise we have a huge number of categories - one for each topic - that is unwieldy. (I would like this option for setting up event displays in the sidebar - so I could have sidebars for functional areas tied to particular pages) Does such a …
Does anybody know if there is a Mixed effect random forest model for Python Windows? The merf package https://anaconda.org/search?q=merf+ seems to only be available on a linux environment? thanks!
<form method="get" action="example.com/?category=1"> <input type="submit"> </form> action parameter may be any page etc. but it always redirect to homepage. If I change method to POST - then all fine. What is the problem here?
Let's say I have data with two target labels, A and B. I want to design a random forest that has three outputs: A, B and Not sure. Items in the Not sure category would be a mix of A and B that would be about evenly distributed. I don't mind writing the RF from scratch. Two questions: What should my split criterion be? Can this problem be reposed in a standard RF framework?
in a scientific computing application of neural networks, I have to maximize several neural networks with scalar output with respect to a target/loss function (coming from a weak form of a PDE). It is known from theoretical considerations that typically the functions that would be optimal with respect to the target function (i.e. the maximizers) are extremly oscillatory functions. I suppose that this is the reason, why - according to my first numerical experiments - typical network architectures, initializations and …
In the event display, if it's a recurring event, the 'current' date (date selected from calendar - not today's date) for the event does not display - only next date/dates. I need to add a simple line above the Next info that simply says 'Date:' with the current event's date/time being displayed. (Exactly as is displayed for one-time-only events) I tried using eo_get_current_occurrence_of but couldn't seem to get to where I needed to get. I don't see this function being …
I am currently using hook wp_trash_post to trigger my custom API when a WooCommerce Product is trashed. This is working fine for the case of single trash. But, in case of Bulk trash this event is executing multiple times. for example if 3 products are selected to trash then this event will trigger 3 times. I need different event for Bulk Trash which will execute one time but having all of product ids.Hopefully it is clear to understand. Please Help!