I created a custom comments_list() function, it works fine, the only problem is to show child comments inside the parent div. It works well with first and second depth levels but not for others. This is my code: /* ----------------------------------------------------------------------------- * Comments custom functions * -------------------------------------------------------------------------- */ //Custom comments lst function t_one_comments_list( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch( $comment->comment_type ) : case 'pingback' : case 'trackback' : ?> <li <?php comment_class(); ?> id="comment<?php comment_ID(); ?>"> <div class="back-link"><?php …
Is it possible to show the WordPress home page slug visible in the URL bar? I mean when someone visits my WordPress website home page rather than displaying (considering that my website URL is website.com) "website.com" it must shows "website.com/home-slug" in the browser URL bar. Note: I am using a static page as the home page and my permalink uses "post-name". I am not looking for a way to hide the home slug but a way to make it visible …
I'm developing a block theme and I need the user to edit the site content with the full site editor in two different languages. In this situation, what would be the approach to allow the same page to have two versions, each one in a different language?
Wordpress tinyMCE keep adding <p> tags when I saved my custom post types in visual mode opened! I had searching for many solutions, but not working. Here is the solution that I found, but this is unable to stop wordpress from adding annoying <p> tags from my html codes: Javascript: <script type="text/javascript"> tinyMCE.init({force_p_newlines : false}); </script> PHP function tinymce_remove_root_block_tag( $init ) { $init['wpautop'] = false; $init['force_p_newlines'] = false; $init['forced_root_block'] = false; return $init; } add_filter( 'tiny_mce_before_init', 'tinymce_remove_root_block_tag' ); I don't …
I am using machine learning models to predict an ordinal variable (values: 1,2,3,4, and 5) using 7 different features. I posed this as a regression problem, so the final outputs of a model are continuous variables. So an evaluation box plot looks like this: I experiment with both linear (linear regression, linear SVMs) and nonlinear models (SVMs with RBF, Random forest, Gradient boosting machines ). The models are trained using cross-validation (~1600 samples), and 25% of the dataset is used …
We are building a landing page site (only 2 pages total) for a client where they are physically mailing out access codes to specific customers. Therefore, I am trying to create a login system where ideally, a user logs in with a pre-determined access code. I have been trying different hacks of a login type of but nothing is working to create a single-step, simple process. The "verification" system that this site uses is close to what I'm looking for, …
I am currently training a few custom models that require about 12Gb GPU memory at the most. My setup has about 96Gb of GPU memory and python/Jupyter still manages to hog up all the gpu memory to the point that I get the Resource exhausted error thrown at me. I am stuck at this peculiar issue for a while and hence any help will be appreciated. Now, when loading a vgg based model similar to this: from keras.applications.vgg16 import VGG16 …
I recently received a manuscript for review in which author used ~1000 "fake" data points, so that the final centroid of K-mean stays within the required range. Neither me nor the author seems to have background in data science and the paper is more of application into our research area. I have tried to find published work related to such method of restricting k-mean centers, but failed to do so. However, on simple logic, it seems like valid way, so …
Is there any way through which I can declare the dynamic variable in php. for eg, I am using a for loop and the variable name is $message. and I want to add some dynamic data at the end of the variable name. code is below foreach ($quant as $quantity) { $message.$quantity['type'] = 'Listing ID : '.$quantity['product_id'].' With Quantity: '.$quantity['quantity'].'MT, State- '.$quantity['state_name'].' and Coal type-'.$quantity['coal_type'].'<br>'; } so if the $quantity['type'] = 1, then the variable name should be $message1 and …
On my archive page is a sidebar which has a style I want to edit. On my local machine, the style is in wc-blocks-style.css. I edited it successfully and it renders fine. However, after deployment of the website to CPanel, the style is being rendered from an online wc-blocks-style.css. The style link is as follows: <link rel='stylesheet' id='wc-blocks-style-css' href='https://c0.wp.com/p/woocommerce/6.5.1/packages/woocommerce-blocks/build/wc-blocks-style.css' media='all' />. All other Woocommerce styles are also loaded from this online repository. My question is, how do I make my …
I am using an attachment.php file to show large versions of images that have been clicked on elsewhere. I'd like to pull the image alt text as a caption under the image with javascript, but the alt text isn't included when when wp_get_attachment_image_src() is used. I don't think WP has a function to retrieve it, so I need my own. To write that function I need to know...Where is the alt text for an image stored? My attachment page uses …
I have worked with a few GAN-like algorithms, but always with similar inputs and outputs. Being only a novice in deep learning, I often work by adapting an already existing Notebook, but today I have a more complex problem and I cannot find a similar example. For my algorithm I need to predict a curve, which is a list of floats (e.g. dimension 20x1), from two types of input data; a 2D image (e.g. a 16x16 normalized float array) and …
I have a dataset after feature selection of around 6500 features and 10,000 data rows. I am using LightGBM model. I want to know if I should check the feature set for multicollinearity. If two or more features are correlated how does it affect the tree building and classification prediction How does LightGBM deal with multicollinearity? Does it have any adverse effects?
Queries regarding feature importance for categorical features: Context: I have almost 185 categorical features and these categorical features have either 2 or 3 or 8 or 1 or sometimes 4 categories, null's also. I need to select top 60 features for my model. I also understand that features needs to be selected based on business importance OR feature importance by random forest / decision tree. Queries: I have plotted histograms for each feature (value count vs category) to analyse. What …
Wondering if there's a way to edit our search.php or .htaccess or function.php (or anything else...) so that our search function on our main site (www.oursite.com) includes the subdomain of blog.ourwebsite.com? Any thoughts or suggestions are appreciated it..
I am unable to find an answer to this so I'm trying my luck here. Is there a way to get the coauthor the moment it's added as a coauthor? I want to trigger an event exactly when the author gets added.
I would like to set up some restrictions on how some roles can access given posts to edit in Dashboard. I have a custom post type affiliates having 2 nested levels. Custom Role User Editor should be able to edit under a level all posts but the normal editor should have access just on items defined by a custom field relation user - post_id Is there an easy way to implement this
I'm working on a TensorFlow model, and I would like to have different logic in the model depending on the input. My question is if it's possible to have a "dispatch" layer in TensorFlow that depending on the input uses one model or another? Simplified example: Imagine your input has two fields a: int and b: Optional[int]. This means b can be defined or not. If b is not None you want to execute some layers, and if it's None …
I have a post slider on the homepage that shows a specific category (slider). The thing is that I do not want this category to appear on other pages (except homepage) because I have "relevant posts" at the bottom of every blog category post and it is mixing it up. Any suggestions?
Suppose we registered the composers and the interprets custom taxonomies. The composers taxonomy could have the following terms: Wolfgang Amadeus Mozart Ludwig van Beethoven Richard Wagner The interprets taxonomy could have the following terms: Glenn Gould Daniel Barenboim Vienna State Opera I am wondering whether the WordPress template hierarchy has a special file , like taxonomy-terms.php, to list taxonomy terms with a simple loop: <?php while ( have_posts() ) : the_post(); the_title(); endwhile; ?> This would print (assuming the /%postname%/ …
Not working on WordPress 6.0: https://thealliance.health/for-providers/resources/provider-news-archives/ Working dev site on WordPress 5.9.3: https://ccahdev.wpengine.com/for-providers/resources/provider-news-archives/ Here is the function if somebody can spot what may have been deprecated: function wpb_postsbycategory2022() { $posts = get_posts( array( 'category_name' => 'Provider News', 'nopaging' => true, 'orderby' => 'date', 'order' => 'DESC', // it's DESC; not DSC // There's no use setting posts_per_page when nopaging is enabled. // Because posts_per_page will be ignored when nopaging is enabled. ) ); $_year_year = ''; // previous years value …
I have a custom post called event and I have to show all the authors who have added the post. I have tried the below code but I am getting all the users on the page. For example. There are 4 users called A, B, C, and D on the website and A and B added the post. Now I have to get only A and B users but below code getting all the users like A,B,C,D Any idea how …
I am trying to assign costs to the confusion matrix. That is, in my problem, a FP does not have the same cost as a FN, so I want to assign to these cases a cost "x" so that the algorithm learns based on those costs. I will explain my case a little more with an example: When we want to detect credit card fraud, it does not have the same cost to predict that it is not fraud when …
I am using LSTM model to predict the data traffic in every second of a base station. The dataset is as follows: The test and train prediction looks as follows: And the RMSE values for train score and test score are 32.54 and 30.03 respectively. To reduce the RMSE values I have changed the lookback value to 15,20 and 30 but it's not reducing. Can somebody tell me the reason behind this huge prediction error and some advice on how …
I am new to Stack exchange as well as Wordpress. So I don't know if i am in right place asking this question. I am writing a technical blog on my wordpress site and in that blog i want to include a custom calculator where users on entering values of 3 mentioned variables, the calculator will predict the outcome of the dependent variable. Suppose for example Y = 5X + 4T. I want to build a calculator in my blog …
I have a model that predicts the level of injury over 3 classes: Low, Medium and High. I wish to optimize the model parameters on the scoring basis of precision. However, precision is class specific, we can determine the precision of low, medium and high separately. Is there a way to determine something like "Overall Precision" from the confusion matrix?
can you help me understand this better? I need to detect anomalies so I am trying to fit an lstm model using validation_data but the losses does not converge. Do they really need to converge? Does the validation data should resemble train or test data or inbetween? Also, which value should be lower, loss or val_loss ? Thankyou!
I trying to classify this data set (https://www.kaggle.com/datasets/fedesoriano/stroke-prediction-dataset) to classify if a patient is at risk for having a stroke. As the title says, whatever test I run to classify the patients, I keep running into the final results having too many false-positives or too many false-negative results. The data itself is severely imbalanced (95% 0s to 5% 1 (had a stroke)) and in spite of doing various things to try and balance it or compensate for it, I keep …
For some reason http://factualfiction.com/marsartists/ displays correctly on a phone when held in landscape position, but not in the normal portrait position. The site uses an old 2012 child-theme and I'm unsure of how this recent problem originated, but wondering if there is a quick fix...? Thank you
I have a use case where I have text data entered by an approver while approving of some loan. I have to make some inferences as to what could be the reasons for approval using NLP. How should I go about it? It's a Non english language. Can Clustering of text help?? Is it possible to cluster TEXT OF non English language using python libraries.
I did a quick search on here and Google and can't really find something helpful. This question here doesn't fit my bill either. I create websites for small business/startups/persons that rarely change content. With my HTML/CSS/PHP knowledge I prefer to build the static pages from scratch so that I can control every single aspect of it (I am aware I could write WP themes but I see it rather redundant and an overkill). I simply don't like to use WP …
When would one use Random Forest over SVM and vice versa? I understand that cross-validation and model comparison is an important aspect of choosing a model, but here I would like to learn more about rules of thumb and heuristics of the two methods. Can someone please explain the subtleties, strengths, and weaknesses of the classifiers as well as problems, which are best suited to each of them?
How can i display multiple posts and posts content on a single URL. Like this https://www.recruitment.guru/ssc/ssc-recruitment/ showing posts on single post page. Please suggest a solution.
I have a 32x20 matrix for which I am trying to use XGBoost (Regression). I am looping through rows to produce an out of sample forecast. I'm surprised that XGBoost only returns an out of sample error (MAPE) of 3-4%. When I run the data through other algorithms (glmboost, boosted linear model), I get MAPEs around 1.8-2.5%. I'm surprised XGBoost is so deficient. I suspect I am under-optimizing hyperparameters. I include a gridsearch, which I ran below, but the error …