I am trying to automate a whole bulk of my pages and one of the shortcodes I have created is to output the NextGen Gallery Tags by using the page custom fields that each page has a unique id. This id is actually tagged into certain galleries which I want to output on the page. For those unfamiliar with NextGen Gallery tags shortcode. Please visit this link. Each page has a custom field "gallery_id" which I input a unique tagged …
I'm having a hard time figuring out why my repeatable fields javascript doesn't work. I'm using the following plugin: Rhyzz (repeatable-fields): http://www.rhyzz.com/repeatable-fields.html. I scraped the website and I see he ran the script inside html and also ran his javascript all on the same page. My website is a lot larger. I'm using Wordpress and I did the following to call the script in functions.php. wp_enqueue_script( 'jquery', 'https://code.jquery.com/jquery-1.11.2.min.js', array(), '20120206', true ); wp_enqueue_script( 'jquery-ui', 'https://code.jquery.com/ui/1.11.4/jquery-ui.min.js', array(), '20120206', true ); wp_enqueue_script( …
I am trying to use anomaly detection to find the anomalies in my time series, and if I find it, I will replace it with my past values. I'm trying to do this because I want to create an upper and lower bound to replace those anomalies and by using the past values will help me to create this bound. Is there any guidance or example, where I can learn to do this? Thanks!
I created a new tab called "Videos" inside of the BuddyPress Profile page. This tab contains all video posts added by that user. The problem is that it only shows the first 12 posts and the pagination does not show up. I did try to include the pagination code provided by the theme but to no avail. Notes: I am using a theme called "VideoTube" The post loop to be paginated is from a custom post type called "video" The …
You also evaluate your model on the test set, and find the following: Human-level performance 0.1% Training set error 2.0% Dev set error 2.1% Test set error 7.0% What does this mean? (Check the two best options.) You have underfit to the dev set. You should get a bigger test set. You should try to get a bigger dev set. You have overfit to the dev set.
I am building a Tennis stroke classification system using CNN. I assume each stroke contains 3 steps/classes ('Ready', 'Impact', 'Finish'). I want to train a model which will predict whether the input video contains these steps/classes in it. I have tried training 3 models for each step as binary classification. Example of one step model classes: 1 - ready 0 - not-ready(other incorrect steps). But this method failed since there are more features in 'not-ready' class. I got only 4% …
I wanted to change the author when a post change from draft to publish. I have $_GET['auth_id'] variable in post edit screen like this ...wp-admin/post.php?post=53&action=edit&auth_id=5. I tried save_post hook to change the post author like below function change_pos_auth($post_id){ if ( ! wp_is_post_revision( $post_id ) ){ // unhook this function so it doesn't loop infinitely remove_action('save_post','change_pos_auth'); if ( isset($_GET['auth_id']) ) { $args = array('ID'=>$post_id,'post_author'=>$_GET['auth_id']); // update the post, which calls save_post again wp_update_post( $args ); } // re-hook this function add_action('save_post','change_pos_auth'); …
Trying to obtain the page url with the following code prior to Wordpress 6.0 works, but after update to Wordpress 6.0, $wp->request is coming through as an empty string on all pages. I have Post name set in permalinks under Common Settings if that matters. The code below no longer works for getting the current url in the browser: add_query_arg($wp->query_vars, $wp->request); If there a new way to obtain the current url in the browser with Wordpress 6.0? I would need …
My site with pictures is set up so that the posts do not have a title and have only tags. I would like to know how to use all tags in permalinks settings?
I have data collected from a computer simulation of football games which seem to have recurring patterns of the following form. if madrid plays arsernal and the match ends under 3 goal, then on their next match against each others, madrid will win. if madrid happens to loose and then plays against chelsea next, they will win 90% of the time. how do I find such inferences from simulation generated data like this. There are other forms of hidden patterns …
I am working on a music site which has custom post types- 'artists', and 'releases'. I have about 3,000 artists, and about 19,000 Releases in my database. It's been suggested to me that I should create a taxonomy term for each release and each artist to eliminate some slow queries on my site. Anyway, I know how to create a new taxonomy, and how to make terms by hand. How can I auto create terms in my release taxonomy, where …
In regards to training a neural network, it is often said that increasing the batch size decreases the network's ability to generalize, as alluded to here. This is due to the fact that training on large batches causes the network to converge to sharp minimas, as opposed to wide ones, as explained here. This begs the question: In situations where all available computing power can be used by training on a batch size of one, is there a benefit to …
Bit of a strange one. One of my clients site is showing <meta name='robots' content='noindex,follow' /> in the head. The Search Engine Visibility checkbox is unchecked. I've tried activating 2019 theme and deactivating all plugins and still the tag shows. Never encountered this before. Any ideas?
I recently become familiar with Interpretable ML and I found some libraries like LIME. I would be thankful if you can suggest to me some libraries and what are the advantages of each library.
I want to train a model for object detection. How do I have to labeling the train data? Is it enough to label the class/content of each box in the image or do I have to add the box position additionally? Thank you
I want to show Wordpress post by day/date in homepage. ex: Monday, January 03 post 1 post 2 post 3 Sunday, January 02 post 1 post 2 post 3 Saturday, January 01 post 1 post 2 post 3 What Wordpress query should I use? Thanks. Sorry for bad english.
I am writing a plugin that creates a custom block. When the block is selected/focused in the editor, a border is created abound it (blue in the current version of WP). I would like to disable the border for the specific block type, either in JavaScript or CSS. The problem is that the block content in the editor is wider than the block border, so it looks awkward. What would be a good solution? EDIT (further explanation): The content of …
I'm trying to put together a script that classifies comments into either adequate or inadequate. I put a question up here earlier with all my code, but I think I've isolated the problem down into the setup of the model, so I deleted that one, and hopefully this is more streamlined and easy to follow. The example i'm trying to follow is the classic IMDB comment, where the comments are either positive or negative, but again in my instance, adequate …
I have a dataset that has high collinearity among variables. When I created the linear regression model, I could not include more than five variables ( I eliminated the feature whenever VIF>5). But I need to have all the variables in the model and find their relative importance. Is there any way around it?. I was thinking about doing PCA and creating models on principal components. Does it help?.
I have a plugin for editing certain options already stored in the database. It creates an options page under Settings with a simple form that populates each field with whatever values are stored in the database for the given field. When the page loads, each of the options loaded into the fields are correct, but if I edit any of the fields and click "Save changes", all of the fields on the page are cleared out, in addition to deleting …
Here's the scenario - I want to select fontawesome icons from the dropdown list but it's not working. For some reason the class inside span is not adding up (I have tried jQuery().append(), CSS) but so far no luck. ANY help would be appreciated. Code in Page.php file <div class="features-block-one"> <div class="icon-one"> <span class="<?php get_theme_mod('features_one_icon' ,'fa fa-bullseye');?>"> </span> </div> </div> Code in Customizer file //block one icon $wp_customize->add_setting( 'features_one_icon', array( 'default' => 'fa-fa box', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_key', …
I'm not sure if this is an appropriate place for this question, so please feel free to redirect me if it is not. I just moved it from Super User, where it seemed like there weren't many similar questions. Please also feel free to suggest tags. I'm trying to modify part of an old code. It uses regression to describe the relationship between two variables (described as "a fourth order power series in X and y"). I know very little …
I am using three different of the shelf classifiers. It's a three class classification task. I want to calculate the optimal weights (c1weight, c2weight, c3weight) for each classifier (real task more classifiers and also weights for each class). Maybe simple grid search approach or sklearn ensemble classifier could do that. vc = VotingClassifier(estimators=[('gbc',GradientBoostingClassifier()), ('rf',RandomForestClassifier()),('svc',SVC(probability=True))], voting='soft',n_jobs=-1) params = {'weights':[[1,2,3],[2,1,3],[3,2,1]]} grid_Search = GridSearchCV(param_grid = params, estimator=vc) grid_Search.fit(X_new,y) print(grid_Search.best_Score_) I don't understand how to implement this for the following code. def get_classification(text, c1weight, …
Is it possible to login to my different WP website from another WP website (they have different domain and host) ? Actually, I am trying to create a post on one of my site from my another site using Rest API? I don't even know if it is possible? If it is possible, can anyone please shade some light on this? I have been trying hard but I am stuck from past few days. All I am getting is 401() …
In the original publication of the Isolation Forest algorithm, the authors mention a height limit parameter to control the granularity of the algorithm. I did not find that explicit parameter on the Sklearn implementation of the algorithm, and I was wondering whether it is possible to control granularity in some other way?
Can any one please explain how to add a post in WordPress without assigning it to any category. Actually I want to display some news or some quick information. So, it does not come to any category in my blog. In this type of time, I do not want to assign to any category. for example, http://www.someSiteURL.com/this-is-news-about-something-awesome/ http://www.someSiteURL.com/wordpress-themes/Anan-wordpress-theme-review/ The first url is what i want to have. But by default, it automatically add "uncategorized". My permalink structure is "/%category%/%postname%/" and …
I am sorry if this is a well-known phenomenon but I can't quite wrap my head around this. I have a related question: How To Develop Cluster Models Where the Clusters Occur Along Subsets of Dimensions in Multidimensional Data?. There are good answers for feature selection and cluster metrics but I think this phenomenon deserves special attention. I have simulated 3 clusters along 1 dimension, and then simulated 3 clusters along 2 dimensions, and then combined them into a dataset …
SUMMARY I'm building a linear regression model using Scikit and noticing that the model "performance" (RMSE and max error, namely) varies depending on whether I use the default LR or whether I apply PolynomialFeature(degree=1). My understanding is that these outcomes should be identical, since they are both utilizing a single-order LR model, however, my error is consistently lower when using the PolyFeatures version. TLDR When I run the code below, the second chunk (polynomial = degree of 1) is consistently …
I'm running a large database of musical artists and their releases. I inherited the site after it running for a long time. There are currently several different custom post types, created with a Toolset plugin. The post types are hierarchical like this Artists | Directors | Releases | Albums | Singles | Videos | Misc | Artists and Directors are parent to Releases, which is a parent to the Version Albums | Singles | Videos | Misc | are the …
I am new to attention-based models and wanted to understand more about the attention mask in NLP models. attention_mask: an optional torch.LongTensor of shape [batch_size, sequence_length] with indices selected in [0, 1]. It's a mask to be used if the input sequence length is smaller than the max input sequence length in the current batch. It's the mask that we typically use for attention when a batch has varying length sentences. So a normal attention mask is supposed to look …
Given a corpus of product descriptions (say, vacuum cleaners), I'm looking for a way to group the documents that are all of the same type (where a type can be cordless vacuums, shampooer, carpet cleaner, industrial vacuum, etc.). The approach I'm exploring is to use NER. I'm labeling a set of these documents with tags such as (KIND, BRAND, MODEL). The theory is that I'd then run new documents through the model, and the tokens corresponding to those tags would …
I'm training a classifier using this loss function: $$ \mathcal{L} = \mathcal{L}_{CE} - \lambda_1 \mathcal{L}_{push} +\lambda_2 \mathcal{L}_{pull} $$ I need to maximize a certain value using $\mathcal{L}_{push}$ and that's why it has a negative coefficient. The problem is while I'm training the model the loss value became negative and I keep getting random accuracy results. I tried changing $- \lambda_1 \mathcal{L}_{push}$ to $\lambda_1 \frac{1}{ \mathcal{L}_{push}}$ to get numeric stability and results are not bad anymore. The thing is I'm not …
Hi there, My question is about how to read ECDF graphs. I am still quite unsure what the jumps / zig-zags in the graph mean and what is happening when there is a horizontal line and so on. I would be happy if someone can explain me how I am suppose to read this graph and what information I can get from it. Thank you
I'm following the instructions on "Installing WordPress Locally on Your Mac With MAMP" and I'm on step 4. The problem I'm having is in this sentence: "Lastly, we've got to run WordPress' famous 5-minute install. Visit your local site (localhost:port or localhost:port/wordpress), and enter the following information into the database setup form: Database Name: wordpresstest User Name (database): root Password (database): root Database Host/server: localhost Table Prefix: wp_ Ok, I have no idea what database setup form the instructions are …
Is there any way to fix the K-Means cluster label. I am working with 4 clusters and whenever I run the python program from the beginning the cluster labels change. Is it possible to fix the cluster labels. I am trying to play with the parameter random state, but does not seem to work.