I am pulling 2 categories into 2 dropdown lists. When I click submit the URL is showing the filtering but its just loading the homepage. I want the user to be able to select multiple categories and submit to show results. <?php $price = array( 'show_option_all' => '', 'show_option_none' => 'Price Range:', 'orderby' => 'ID', 'order' => 'ASC', 'show_count' => 1, 'hide_empty' => 1, 'child_of' => 110, 'exclude' => '', 'echo' => 1, 'selected' => 0, 'hierarchical' => 1, 'name' …
I am training a VGG net on STL-10 dataset I am getting Top-5 validation accuracy about 98% and Top-1 validation accuracy about 83% But both the Top-1 and Top-5 Training accuracy is reaching 100% Does this mean that the network is over-fitting? Or not? Code:: def conv2d(inp,name,kshape,s): with tf.variable_scope(name) as scope: kernel = get_weights('weights',shape=kshape) conv = tf.nn.conv2d(inp,kernel,[1,s,s,1],'SAME') bias = get_bias('biases',shape=kshape[3]) preact = tf.nn.bias_add(conv,bias) convlayer = tf.nn.relu(preact,name=scope.name) return convlayer def maxpool(inp,name,k,s): return tf.nn.max_pool(inp,ksize=[1,k,k,1],strides=[1,s,s,1],padding='SAME',name=name) def loss(logits,labels): labels = tf.reshape(tf.cast(labels,tf.int64),[-1]) #print labels.get_shape().as_list(),logits.get_shape().as_list() cross_entropy …
I want to build a music recommender predicting the number of times a user will listen to a song. I am using the Implicit library and following this close example : https://github.com/benfred/implicit/blob/main/examples/tutorial_lastfm.ipynb I wanted to know how can I predict the number of plays for a given user for a specific song, all I can see there and in the documentation is to recommend songs to a given user with scores of proximity but without giving the actual prediction
Was recommended to post here instead of StackOverflow I am looking to do some ML, and I just need to know the words to start going off and which library/path to go down. I have two data sets that look something like the below, | UserName | Location | Department | |test.user | Chicago | IT | |asd.smith | LA | Marketing | |qwe.smith | Chicago | IT | |dfg.smith | Chicago | Marketing | and | UserName | Permission …
I have a dataset that has the following columns: The variable I'm trying to predict is "rent". My dataset looks a lot similar to what happens in this notebook. I tried to normalize the rent column and the area column using log transformation since both columns had a positive skewness. Here's the rent column and area column distribution before and after the log transformation. Before: After: I thought after these changes my regression models would improve and in fact they …
Hello I made a custom theme and moved it from MAMP to a cloud server. For some reason the CSS is an empty file. File path is correct, checked the file in cPanel and it has the full .css sheet. But when I go to console and follow the path it is just empty. My .js file loads fine and I beleive i enqueued the paths properly. Any help is greatly appreciated and thank you for your time! Functions <?php …
I just started to use recurrent neural networks (RNN) with Keras for time-series forecasting and I found this tutorial Forecasting with RNN. I have difficulties understanding how to build the training data both regarding the syntax and the format of the input data. Here is the code: import pandas as pd import numpy as np import tensorflow as tf from tensorflow import keras from matplotlib import pyplot as plt # Read the data for the parameters from a csv file …
Question: How to filter uppercase and lowercase when the word 'tag' is written in lowercase? and vice versa, how to filter the word 'tag' which is written in capital letters? Here's the code I got from a plugin that hasn't been updated in a few years. function auto_link_tags($content){ //$post_id = get_the_ID(); $post_tags = get_the_tags(); if ($post_tags) { $i = 0; foreach($post_tags as $tag) { $tags[$i] = "~<(?:a\\s.*?</a>|[^>]+>)(*SKIP)(*FAIL)|\\b(?:\\b(" . $tag->name . ")\\b(?=[^>]*(<|$)))\\b~i"; $tag_url = get_tag_link($tag->term_id); $tag_html[$i] = '<a href="' . $tag_url …
How to vectorize one-line text data? I have used tf-idf including bigrams and trigrams but I am not able to get good results. I have purchase order descriptions which are one-liners and I need to classify. It is a multi-class imbalanced data and I have a small dataset to train around 700 PO descriptions. The number of classes is 7 and the class distribution is similar to exponential. One class is dominating. My take is that TF IDF should not …
I have coded a working Bootstrap carousel, it needs to be converted to WP. It's a small chunk of the site, but as a Wordpress newbie, am stuck in understanding the technical issue. So here's what I am trying to do: To show all those posts that have a featured image uploaded to show as a part of the Bootstrap carousel, then to limit the posts per page as needed. As a first step, I thought to not use WP_Query …
I installed WordPress from a zip file via FTP, followed the install procedure exactly - When accessing the URL, all I could see is a default page without opening any install script. I then manually entered https://"mysite".com/wp-login.php and it opened a login window. I entered the username and PW I created in wp-config.php - I was advised no such user- double checked everything and found no errors I could determine. I'm guessing that the problem is something in either database …
I'm in the process of reworking the ASAM database. Excerpted, it looks like this: 4155 PIRATES BULK CARRIER GULF OF ADEN: Bulk carrier fired upon 3 Aug 09 at 1500 UTC while underway in position 13-46.5N 050-42.3E. Ten heavily armed pirates in two boats fired upon the vessel underway. The pirates failed to board the vessel due to evasive action taken by the master. All crew and ship properties are safe (IMB). 4156 PIRATES CARGO SHIP NIGERIA: Vessel (SATURNAS) boarded, …
I need to extract some "valuable" information from document scan. For example, document's number, incoming date, organizations, persons, etc. Example document: I'm trying to extract highlighted segment of the document. Original scan doesn't have that highlighting. And value can be handwritten or typewritten. I tried U-Net and Mask RCNN for my dataset (~100 examples). Without any success. Any ideas?
Hello guys i'm trying to export my plugin table in the same page, i tried to do hidden iframe but it's still not works, can you kindly check my code please? thanks. PHP: add_action( "wp_ajax_export_plugin", "export_plugin" ); //update_records is action add_action( "wp_ajax_nopriv_export_plugin", "export_plugin" ); function export_plugin(){ global $wpdb; $wpdb->show_errors = TRUE; $wpdb->suppress_errors = FALSE; $plugin_name = $_POST['plugin-name']; // PLUGIN NAME $plugin_export_type = $_POST['export-type']; // PLUGIN EXPORT TYPE as CVS/SQL/XML $plugin_name; // ?? not defined in original code $results = $wpdb->get_results("SELECT …
I found some confusion understanding the importance of vertical and horizontal stacks as a solution to the blind spot problem presented in the original pixel cnn architecture discussed in this paper. The vertical and horizontal stacks ideas were presented in the this paper. Therefore, after browsing, I found this link to explain the concept. In the vertical stack section of the web page, I still find that pixel f, still cannot see pixels c, d and e. Any help is …
I am new to Machine Learning and started solving the Titanic Survivor problem on Kaggle. While solving the problem using Logistic Regression I used various models having polynomial features with degree $2,3,4,5,6$ . Theoretically the accuracy on training set should increase with degree however it started decreasing post degree $2$ . The graph is as per below
I have to make calls to multiple pages of a Woocommerce product database (getting all products in one go seems to not be an option), and the looping and collection of the results isn't working as I expect. I should see an array with just under 900 objects, but all I'm seeing is an empty array. I'm very new to PHP. THe relevant code below: function get_awesome_products() { for ($count = 1; $count <= 9; $count++ ) { if ($count …
I have a hard time understanding the LSTM model performance as I summarize my model as follow: X_train.shape (120, 7, 11) y_train.shape (120,) X_test.shape (16, 7, 11) y_test.shape (16,) model = keras.Sequential() model.add(keras.layers.LSTM(100, input_shape=(X_train.shape[1], X_train.shape[2]), return_sequences = True)) model.add(keras.layers.Dropout(rate = 0.2)) model.add(keras.layers.LSTM(20)) model.add(keras.layers.Dropout(rate = 0.2)) model.add(keras.layers.Dense(1)) model.compile(loss='mean_squared_error', optimizer=keras.optimizers.Adam(0.001), metrics = ['mae']) history = model.fit( X_train, y_train, epochs=60, batch_size=5, verbose= 0, validation_split = 0.1, shuffle=False ) Based on the below plots, both MSE and MAE decrease in the training process and …
The FID seems to be the most popular evaluation metric for GANs and other generative models. Why is it so popular? It seems to have some obvious issues, such as the assumption of Gaussian distributions, the lack of ability to detect memorization of training data, and so on. Some other issues are also discussed here: https://en.wikipedia.org/wiki/Fr%C3%A9chet_inception_distance Thanks!
I am exploring Random Forests regressors using sklearn by trying to predict the returns of a stock based on the past hour data. I have two inputs: the return (% of change) and the volume of the stock for the last 50 mins. My output is the predicted price for the next 10 minutes. Here is an example of input data: Return Volume 0 0.000420 119.447233 1 -0.001093 86.455629 2 0.000277 117.940777 3 0.000256 38.084008 4 0.001275 74.376315 ... 45 …
I am currently using the wp_roles() function to retrieve all user roles available like this: <?php foreach (wp_roles()->get_names() as $role) { echo translate_user_role( $role ); } ?> How would I retrieve an array/list of all custom roles that I've created without the default roles (Administrator, Editor, Subscriber, etc) included?
I'm trying to do a stratified split for a skewed dataset with target variable 'b'. The target variable is a bit value (either 0 or 1). Here's an example: df = pd.DataFrame(data={'a': np.random.rand(100000), 'b': 0}) df.loc[np.random.randint(0, 100000, 1000), 'b'] = 1 tr, ts = train_test_split(df, test_size=.2, stratify=df['b']) print(tr.shape, ts.shape) This code returns the following: (93105, 2) (38, 2) My problem is that the returned train/test arrays do not meet the set split ratio of 20%. My setup: Python 3.7.0 (32bit) …
What is the right action to invoke before a custom post type is getting edited in dashboard and contains the argument the post id? The url /wp-admin/post.php?post=282&action=edit&classic-editor here is what I try $userId = get_current_user_id(); $affiliate = get_field('field_627ff399b5ef6', 'user_' . $userId); $this->currentAffiliate = $affiliate; $subPages = get_children([ 'post_parent' => $affiliate[0]->ID, 'post_type' => 'affiliate', ]); $pageIds = collect($subPages)->pluck('ID')->push($affiliate[0]->ID)->toArray(); if edit page ID is not in $pageIds redirect to the not allowed screen
I'm attempting to pull in some order information from the "shop_order" post_type. This is on a multisite network, so I'm using switch_to_blog(1). When I set the post type as "post" it works great and I get the posts from the correct site. When I set the post_type to "shop_order" I get nothing, despite there being 20,000 'shop_order' records in the database. switch_to_blog(1); $args = array ( //'post_type' => 'post', 'post_type' => 'shop_order', 'posts_per_page' => 2, ); $posts = get_posts( $args …
I have a dataset where each row is a sample and each column is a binary variable. The meaning of $X_{i, j} = 1$ is that we've seen feature $j$ for sample $i$. $X_{i, j} = 0$ means that we haven't seen this feature but we might will. We have around $1000$ binary variables and around $200k$ samples. The target variable, $y$ is categorical. What I'd like to do is to find subsets of variables that precisely predict some $y_k$. …
From a conceptual standpoint I understand the trade off involved with the ROC curve. You can increase the accuracy of true positive predictions but you will be taking on more false positives and vise versa. I wondering how one would target a specific point on the curve for a Logistic Regression model? Would you just raise the probability threshold for what would constitute a 0 or a 1 in the regression? (Like shifting at what probability predictions start to get …
I’m trying to figure out how to massage data and model the following scenario: Customers at a restaurant rate the quality of the service between 1-10. I have data on individual interactions between the servers and customers. Say - length of interaction, type of interaction (refilling beverage, ordering, cleaning, etc). Hypothesis here is each interaction contributes to the final score. I want to build a model that tells me given an interaction, how does it move the score. My intuition …
I want to add a field in my custom meta box, same as below, but not for tags. How can I repeatedly take more inputs in the same field? Here is my code added to functions.php: function dikka_cmb_meoxes( array $meta_boxes ) { $prefix = 'dikka_'; $meta_boxes['details_meox'] = array( 'id' => 'details_meox', 'title' => __( 'Porject Details', 'dikka' ), 'pages' => array( 'portfolio', ), // Post type 'context' => 'normal', 'priority' => 'high', 'show_names' => true, // Show field names on …
Good day, I have ~50 sample trajectories (timeseries) showing reactor temperature over time for a given process. In addition, I have a reference signal of the ideal trajectory for this process. I would like to synchronize all the sample trajectories with the reference trajectory. Performing DTW with 1 sample signal and reference produces new signals along a common axis (as it should). My question is how can I perform this synchronization of all sample trajectories with the reference simultaneously? Such …
I'm making a plugin that compares data from external API with meta items in WordPress backoffice. I tried using wp_remote_get method to query my API but it doesn't return anything, nobody, nothing. When accessed directly with the same URL in browser the API generates JSON array without problems. What am I doing wrong? This is (partially omitted code in the plugin) .......... $chopped = explode("@", $meta['Email'][0]); $url = 'http://example.com/api/users/'.$chopped[0].'/'.$chopped[1]; global $wp_version; $args = array( 'timeout' => 5, 'redirection' => 5, …
I am trying to perform hyperparameter tuning on sklearn_crfsuite.CRF model. When I try to execute below code, it doesn't give any exception but it probably fails to perform fit. And due to which, if I try to get best estimator from grid search, it doesn't work. %%time # define fixed parameters and parameters to search crf = sklearn_crfsuite.CRF( algorithm='lbfgs', max_iterations=100, all_possible_transitions=True ) params_space = { "c1": [0,0.05,0.1, 0.25,0.5,1], "c2": [0,0.05,0.1, 0.25,0.5,1] } # use the same metric for evaluation f1_scorer …