I have a custom footer with events being brought in. However, links are no longer showing while using tribe_get_event_meta. The link given is just my home url link and not the link to the event page. My link code is <?php global $post; $i = 0; $events = tribe_get_events( array( 'posts_per_page' => 3, )); foreach ( $events as $post ) { setup_postdata( $post ); ?> <a class="event-links" href="<?php echo tribe_get_event_meta( get_the_ID(), '_EventURL', true ); ?>" target="_self"> <li class="evlist" id = …
Bonjour, I have brewed a Doom Bar clone. I was aiming at an Original gravity of 1.045 but only managed 1.041. Unfortunately I lost temperature in the ferment and it stuck at 1.020 after 7 days and has remained here. I heated it up and stirred but no action. I have now racked and am clarifying at 4°C. I am going to bottle tommorow. Should I add priming sugar? I am afraid of bottles exploding. Any advice appreciated
There are quite a few library for hyperparameter optimization that are specific to Keras or other Deep Learning libraries, like Hyperas or Talos. My question is, what's the main benefit of using these libraries compared to, for example, sklearn.model_selection.GridSearchCV() or sklearn.model_selection.RandomizedSearchCV?
I've amended the URLs for my custom post type from: url.com/jobs/job-name to url.com/jobs/job-location/job-name Problem is, because this isn't a standard rewrite wordpress doesn't do the 301 redirecting for you. Does anyone know how I could do a 301 redirect for all custom posts to the new URL bearing in mind that job-location would be different depending on the post? Thanks!
I would like to make a graph like the following in python: That is, one curve for each fold. I have the following code where I use an SVM model to classify some data kf = KFold(n_splits=10) a, fma, fmi = [], [], [] for train, eval in kf.split(x_train): x_train_i, x_eval_i, y_train_i, y_eval_i = x_train[train], x_train[eval], y_train[train], y_train[eval] c = svm.SVC(kernel='rbf', gamma='scale', C=40).fit( x_train_i, y_train_i ) p = c.predict(x_eval_i) acc = c.score(x_eval_i, y_eval_i) f1ma = f1_score(y_eval_i, p, average='macro') f1mi = …
I am trying to modify a plugin but I'm a tech newbie. My plugin is for a floating mini cart. it's a great plugin but the position options are limited to "left-middle" or right-middle". I would like it to be shown in the "left-bottom" position of my site. I found an area in the plugin editor that mentioned it's current position (left-middle). I was hoping by simply changing the word "middle" to "bottom" it would work but it did not. …
I have a local WordPress setup in the Turkish language. I have a post title like ... MAMASI .... When I search by keyword maması in lower-case it doesn't find post. I try the table Character set utf8mb4_unicode_ci, utf8mb4_general_ci, utf8_unicode_ci, utf8_general_ci, utf8_turkish_ci but it gave me same result. How can I solve Iı sensivite problem?
I have this code that is working but is giving me the wrong link gives me this link example.com/index.php/sample-page/ but I need this link example.com/sample-page/ <?php global $post; if ( $post->post_parent ) { ?> <a href="<?php echo get_permalink( $post->post_parent ); ?>" > <?php echo get_the_title( $post->post_parent ); ?> </a> <Br><?php echo get_permalink( $post->post_parent ); ?> <?php } ?>
The following question is based purely on the material available on MIT's open courseware youtube channel. (https://www.youtube.com/watch?v=wrEcHhoJxjM). In it, Professor Gilbert Strang explains the general formulation of the momentum gradient descent problem and ultimately arrives at optimum values (40:05 in the video) for the variables $s$ and $\beta$. \ $\textbf{Background}$ Lets begin with the standard gradient descent not covered in this video. The equation for this is: $x_{k+1}=x{k}-s \nabla f(x_k) $ $s$ is the step size, $f(x_k)$ is the value …
I'm going to get several fields from wp_query result. I know about wp_list_pluck() function, but it accepts only one field paramether. How to get several ones if I'd like to take several parameters from each post found? [ Object1 (ID, name, tag), Object2 (ID, name, tag), Object3 (ID, name, tag), etc. ] Thank you for your help afterwards! My code excerpt is here: $search_param = get_param('search_param', null, 'text'); // POST param $term_id = get_term_by('name', "$search_param", 'image_color')->term_id; $args = array( 'post_type' …
I would like to perform a 1D Depthwise convolution (ie the first step of the depthwise-separable convolution) for a machine learning model I am working on. This means that for an input activation space of h x w, there are h kernels, each 1xk, where k is the length of the kernel (see attached figure). This is not currently offered by Keras, but one can use the available Depthwise 2D convolution (which operates on 3D inputs), and simply add an …
I am trying to write a custom layer using subclassing in Keras and then use it in functional API. I followed the advise in the documentation - https://www.tensorflow.org/guide/keras/custom_layers_and_models#you_can_optionally_enable_serialization_on_your_layers but its not working for me. Here is my code snippet- from tensorflow import keras from tensorflow.keras import layers class conv2D_Block(keras.layers.Layer): def __init__(self, filters, kernel_size=(3,3), strides=1, padding='same', pool_size=(2,2), **kwargs): super().__init__(**kwargs) """ self.filters = filters self.kernel_size = kernel_size self.strides = strides self.padding = padding self.pool_size = pool_size """ self.convlayer = layers.Conv2D(filters, kernel_size, strides …
Script Widget bug in WordPress. The embed widget from Funda was working before, clueless why it suddenly stopped working. In Public view, it's not working. Preview mode while logged in to WordPress shows the correct page. Actually, the same embedded script from FUNDA is working on this page https://www.homecrew.nl/rent-out/. But the issue is with this page. The script isn’t working on this page https://www.homecrew.nl/reviews-recensies-beoordelingen-klanten-engels/. The Editor & method of placing the script is the same. I cleared the cache etc. …
Edit 2: The regularization term (reg_term) is sometimes negative due negatative parameters. Hence S[f"dW{l}"] contains some negative values. I realize the reg_term has to be added before taking the sqrt, like this: S[f"dW{l}"] = beta2 * S[f"dW{l}"] + (1 - beta2) * (np.square(gradients[f"dW{l}"] + reg_term)) Edit 1: I see that S[f"dW{l}"] contains some negative values. How is this possible when np.square(gradients[f"dW{l}"] always contains positive values? I have implemented a neural network from scratch which uses mini-batch gradient descent. The network …
I followed the guideline from WP Codex. Changed the site url in general settings Copied the .haccess and the index.php files from the subdirectory to the root Edited the root index.php (new copied file in root) from: '/wp-blog-header.php' ); to '/subdirectory/wp-blog-header.php' ); checked the permalink structure. the following code is in the new copied root .haccess file # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] …
Here's what I mean: I am using a plugin called 'pods' which allows for the creation of Custom (CPT) and for relationships to be formed between those CPT's. However - there's a little flaw that I can see in that I have created a CPT for US States, so each CPT is one individual state which means that each post that is created within this CPT just has the title of the state. Here's the HTML and associated CSS <header …
I need to test an algorithm that computes a function on a dataframe where in each execution I drop a column and computes the function. This is a example in python pyspark but without using rdd: df2581=spark.sparkContext.parallelize([Row(a=1 ,b=3,c=5,d=7,e=9)]).toDF() df2581.show() wo = df2581.rdd.flatMap(lambda x: x[1:] ).map(lambda a:print(type(a))) wo.collect() def f(x): list3 = [] index = 0 list2 = x for j in x: list = array(x) list.remove(list[index]) list3 = list.copy() index += 1 return list3 colu= df2581.columns def add(x,y): return x+y …
I would like to optimize the hyperparameters C and Gamma of an SVC by using grid search for an unbalanced data set. So far I have used class_weights='balanced' and selected the best hyperparameters based on the average of the f1-scores. However, the data set is very unbalanced, i.e. if I chose GridSearchCV with cv=10, then some minority classes are not represented in the validation data. I'm thinking of using SMOTE, but I see the problem here that I would have …
In the image below, I set the page Welcome! as my homepage. There is no link to that page, and there is only one way to go to the homepage: click on the banner. However, there is two different items referring to the homepage in the stat. Do you know what are the differences between them?
I have a Keras h5 file that I want to load into the same model but this one is created using PyTorch. Is ONXX a viable intermediary option? What else can I use?
Is there a way to find out what is using PHP sessions or spawning PHP processes? My Wordpress site gets heavy traffic (3.5 million hits per month). We discovered recently that we had permissions set incorrectly for a long time, meaning nothing could access PHP sessions. Unfortunately, after we fixed permissions, we found that tons of PHP processes are being spawned rapidly and the server goes completely unresponsive. It won't even come back from health check. It's a dedicated Nginx …
So I have to come up with a machine learning model for a specific problem that I have. As far as I know, Keras allows for four different types of classification: Binary, Categorical, Multiclass Classification, and Multilabel Classification. However, I think my problem is so specific that I could use some guidance to see what is the correct type of classification or if I need a different type. I've got a dataset of clothing items that are divided into two …
I'm new to machine learning. I have the following scenario: I have five individuals that are each carrying an accelerometer. That sensor measures movement/acceleration on a scale from 0 to 255, 0 being no movement, 255 being max movement (at a 5-minutes interval). Some individuals carry sensors that are more sensitive, and some that are less sensitive. As such, some individuals' sensors will provide higher values, and some individuals' sensors will provide lower values, for the same movements. Using a …
I am on a fresh install of Wordpress on Ubuntu / LAMP, and noticed that none of my site's images are showing. I tried to install a theme (Sydney) and none of the images were showing up. I was able to fix this by manually installing the theme to the wp-content directory. You can see in the image below that all of the files being requested from wp-content are returning 404 errors. I tried uploading images, but they are returning …
I am working on a multi-label classification problem and faced some memory issues so I would to use the Keras image_dataset_from_directory method to load all the images as batch. How do you apply a multi-label technique on this method. I have these folders: ['Tomato_BacterialSpot', 'Tomato_EarlyBlight', 'Tomato_Healthy', 'Tomato_LateBlight'] I am generating class names using the below code. Here is the sample code tutorial for multi-label but they did not use the image_dataset_from_directory technique. label = imagePath.split(os.path.sep)[-2].split("_") and I got the below …
In logistic regression, is a closed-form solution using MLE possible when we have data with a single independent variable? Because then, modeling the data & deriving a close-form solution wouldn't be mathematically complex.
I have the problem, that a customer can buy something. Now I want to predict if the customer is buying another things in the next few days. So that you can summarize the packages and delivery not every package individually. Has someone read a similar issue? My data looks like customerid order article mandatoryDeliveryDate 1 03.05 Shoes 05.05 1 04.05 Paper 05.05 2 10.04 PS5 11.04 2 12.04 Laptop 16.04 3 28.04 Clock 30.04 3 [XXX] What I want to …
I have 3 sklearn models which I use to predict a probability score for a binary classification problem. I want to create a weighted average score of all the predictions made by these models. I am stuck at how to find the optimum weights. I have tried to create a weighted average method that would help me: def weighted_average(prob: dict, weights: dict = base_weights): '''Weighted average of all probabilities Prob Dict structure: { 'mfcc': probability of spoof from MFCC Model, …
I am trying to retrain a neural network using transfer learning that can classify whether an image has a certain object, say, a car. My positive sample dataset is quite small, only 2500~ images. It works really well with "regular" binary classification (2500 images of cars/2500 images of flowers and it has to differentiate between those two), but the problem is that I am not sure how to make it classify for all types of images, or how to make …
I am trying to get data from JSON file in Wordpress template using file_get_contents But can not get the file $data = file_get_contents("../assets/data2.json"); $arr = json_decode($data, true); Facing this error while var_dump $data object(WP_Error)#825 (2) { ["errors"]=> array(1) { ["http_request_failed"]=> array(1) { [0]=> string(29) "A valid URL was not provided." } } ["error_data"]=> array(0) { } } My data2.json file is in the assets folder and trying from templates folder in theme folder in wordpress.
What the code does: Imports posts, loops through all the posts and calls wp_insert_post to create a new posts for each import. Objective: Import posts and store them in another table, not under the wp_posts table, but retain the associated wp_postmeta tables. Issues: For some reason, in it's current state, the new table doesn't get created and the posts don't get inserted - What am I doing wrong? I'd like to import the posts to the new table. Since I …
In going through the different tutorials on CNN, autoencoders, and so on I trained myself on the MNIST problem. The different images are stored in a 3D array which shape is (60000,28,28). In some tutorials for the first layer of CNN they use the Flatten function keras.layers.Flatten(input_shape=()) but in other tutorials, they transform the 3D Array in A 4D Array (60.000, 28,28,1 ) that I suppose is identical that use the Flatten function? Am I right? Why there are two …
I'm trying to create a WordPress post using the REST API, OAuth, and cURL. However, I'm running into some trouble. I'm able to create a blank post (no title, slug, etc) using the following code: $header = array(buildAuthorizationHeader($oauth), 'Expect:'); $options = array( CURLOPT_HTTPHEADER => $header, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_POST => true, CURLOPT_URL => $url, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_RETURNTRANSFER => true, CURLOPT_SSL_VERIFYPEER => false); This works as expected - authorizes successfully, and …
I have a model that predicts geolocation coordinates based on some data. The way I have it set up at the moment is that I clustered my points (2D coordinates) into 100 classes that my model predicts with categorical crossentropy as the loss. I realized that this penalizes predictions of (phisically) neighbouring classes just as much as those that are far apart. Ideally my loss would be the euclidian distance between the prediction and the class centroid but then my …
I am working with a modified generative autoencoder and having issues getting the L2 sufficiently low. I think problem is that because my data is over a very large range and is standardized to values between zero and one, small discrepancies in the standardized data lead to larger ones in the unstandardized data. Additionally, my other loss terms, despite being averaged by number of points in the batch, are usually orders of magnitude larger than my L2 loss, which I …