I'm working on a research problem where I need to perform classification for coarse prediction in a feature space and then fine grained regression for getting more precise values. I know that this way of regression should work. I also will essentially deal with feature maps. I am thinking of using a 'stacked hourglass network'. Do I need to identify this by sheer experimentation or can someone intuitively remove some possibilities saying a particular architecture may not be suitable for …
First of all I do not have a lot of experience with wordpress plugins, but I am developing a plugin which has to connect and send data to a remote database ( which it is already doing ). But at this point of time my connection is not secure at all because all the database info is shown for the admin of the site. This is my code at the moment, it works and all but how can I make …
I was going through this Group Specific Recommendation System paper. I want to implement this from scratch. I see that they have used Alternating Least Square. But how are they updating the item factors and user factors? Do I need to find the gradient of those equations (5), (6), (7), (8)? The algorithm I am talking about is in 3.2. Someone help me visualize this via an example of how is the calculation happening. Let me give a short example. …
I have two separate files for Testing and Training. In the training data, I am dropping rows that contain too many missing values . But , In the test data , I cannot afford to drop the rows so I have chosen to impute the missing values using KNN approach . My question is , to impute missing values in the test data using KNN , is it enough to consider only the test data ? As in , neighbors …
I am using this example to rewrite url to load a given file car-details.php but I stil get error Page not found when I access domain.com/account/account_page/9 How can I get this working. class Your_Class { public function init() { add_filter( 'template_include', array( $this, 'include_template' ) ); add_filter( 'init', array( $this, 'rewrite_rules' ) ); } public function include_template( $template ) { //try and get the query var we registered in our query_vars() function $account_page = get_query_var( 'account_page' ); //if the query …
If I convert a spark dataframe into a pandas dataframe and subsequently apply pandas operations and sklearn models to the dataset in databricks, will the operations from pandas and sklearn be distributed across the cluster? Or do i have to use pyspark dataframe operations and pyspark ml packages for operations to be distributed?
I want to display dates in Hindi format like jan 10 using get_the_date() function. What I have tried so far: echo get_the_date(_e('F j')); which outputs: F jJanuary 10, 2017.
I am a beginner to Orange GUI data mining software and I have some questions related to that. First, I would like to know if there is any search function so that I can search if a column contains a specific word. Second, does Orange has any functions for dimension reduction?
I’m very new to using Orange Data Mining software and I’m having a hard time finding what I am looking for. I have 30,000 text files. I wish to use Orange to help me extract key words and phrases, then display to me which documents have the words and phases I’m looking for. I also wish to scan PDFs as well as images to obtain words and phrases. Any guidance and/or Orange workflows would be so appreciated.
Here is My code, it should be filtering by category, it displays all posts on any checkbox I click, I don't know how to fix this, I have tried everything. <form id="filter"> <?php if( $terms = get_terms( 'category', 'orderby=name' ) ) : // to make it simple I use default categories foreach ( $terms as $term ) : echo '<input type="checkbox" name="category[]" value="' . $term->term_id . '" class="br">' . $term->name; echo ''; endforeach; endif; ?> <div class="filter-output"></div> </form> Here is …
calling admin-ajax.php via jquery ajax calls were failing from my site but postman calls to the same url were successfull. After some looking at headers it seems that the referer being set is the difference that calls the failure (500). What would possibly cause admin-ajax.php to care about whether or not a referer is being sent and fail if it is? The error logs just say that memory is running out but why would the referer header change how much …
I'm building a CNN to make a binary classification (1 or zero). For this, I'm using the cost function sigmoid_cross_entropy_with_logits. But for some reason, the cost using this function is never equal to zero even if the prediction is equal to the correct valuel. I tried plotting the output using the formula on TensorFlow's website: https://www.tensorflow.org/api_docs/python/tf/nn/sigmoid_cross_entropy_with_logits This formula: max(x, 0) - x * z + log(1 + exp(-abs(x))) And by making this plot, I realized that it really isn't zero …
I have the following set of data like in the picture, with 366 Temperature values for one year. The first set of data would be for training and the second one for test. I would like to detect the anomalies on the test data. What time steps should I choose when making train sequence data ? I have tried using 32. What model should I train? I tried using keras Conv1D and LSTM, but I can't find the optimal settings. …
I have a dataset with a lot of binary categorical features and a single continuous target value. I would like to cluster them but I am not quite sure what to use? I have in the past used dbscan for something similar and it worked well, but that dataset also had lots of continuous features. Do you have any tips and suggestions? Would you suggest matrix factorization and then cluster? Thank you very much!
I have a dataframe with two text columns and I converted them to a list. I seperated the train and test data as well. But while making a base model TfidfVectorizer throws me an error of 'list' object has no attribute 'lower' Here is the code X['ItemDescription']= X['ItemDescription'].str.lower() X['DiagnosisOne'] = X['DiagnosisOne'].str.lower() from sklearn.model_selection import train_test_split X_train,X_test, y_train, y_test = train_test_split(X,y,test_size=0.2, random_state=42) # Convert abstract text lines into lists train_items = X_train.reset_index().values.tolist() test_items = X_test.reset_index().values.tolist() from sklearn.preprocessing import LabelEncoder label_encoder = …
I have a custom post type that uses several meta fields. In the admin area I would like to be able to search by those meta fields. I have implemented this currently in my functions.php with this code: function custom_search_query( $query ) { if ( is_admin() && is_main_query() && $query->is_search ) { $query->set('meta_query', array( "relation" => "OR", array( 'key' => 'first_name', 'value' => $query->query_vars['s'], 'compare' => 'LIKE' ), array( 'key' => 'last_name', 'value' => $query->query_vars['s'], 'compare' => 'LIKE' ), array( …
I made a simple model to train my data set which consists of (210 samples and each sample consists of a numpy array of 22 values) and x_trian and y_trian look like: and this is my simple code: import tensorflow as tf from tensorflow import keras from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Activation, Dense from tensorflow.keras.optimizers import Adam from tensorflow.keras.metrics import categorical_crossentropy import numpy as np import matplotlib.pyplot as plt import pandas as pd from sklearn.model_selection import train_test_split from …
So I have setup multisite as per the WordPress website page: https://codex.wordpress.org/Create_A_Network I'm using the latest WordPress 4.8. Setup example.com sub.example.com All requests for the subdomain for the dashboard and the site give a 403 - forbidden You don't have permission to access / on this server. .htaccess RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^wp-admin$ wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^(wp-(content|admin|includes).*) …
I am using different ML classifiers for making predictions related to a binary classification. I would like to compare two groups. Let's call them A and B. The already trained and tested classifier is going to make predictions on the instances of A and B. We may call the counts count(1,A) and count(0,A) for the two classes of all elements of A and accordingly for the elements of B, count(1,B), count(0,B). The straightforward inference test would be the Fisher's exact …
I'm making a limitation for image upload based on @brasofilo excellent snippet. In short, it limits user to only uploading image with minimum dimension. However I want to apply this only when user is uploading a featured image. I tried using $pagenow as a conditional, global $pagenow; if ($pagenow == 'media-upload.php') add_filter( 'wp_handle_upload_prefilter', 'wpse_28359_block_small_images_upload' ); But it doesn't work. Any idea here?
I've made a neural network in google colab. The original data contained 12 000 rows (csv 350KB). 4 features and 2 labels. Each epoch would run within a few ms. I tried to increase the amount of data to see if the algorithm would yield better results. All I did was update the file, which now contains 326 000 rows of data (12MB). But the algorithm is now incredibly slow, taking several seconds to run a single epoch making it …
I'm working on a project in which I'm creating a custom post type and custom data entered via meta boxes associated with my custom post type. For whatever reason I decided to code the meta boxes in such a way that the inputs in each metabox are part of an array. For instance, I'm storing longitude and latitude: <p> <label for="latitude">Latitude:</label><br /> <input type="text" id="latitude" name="coordinates[latitude]" class="full-width" value="" /> </p> <p> <label for="longitude">Longitude:</label><br /> <input type="text" id="longitude" name="coordinates[longitude]" class="full-width" value="" …
Let's say I have 365 posts published in 2022. I have 56 posts for each weekday (each weekday has a different theme). Normally, if I were to publish them in order, the 1st Monday post would be published on January 3rd and the second Monday post would be published on January 10th. But I want to reuse these posts and for them to be correctly displayed each year, not just in 2022. So I published batches of posts by weekday. …
I changed the admin URL from /wp-admin like this: rename wp-login.php to mylogin.php replace all occurrences of wp-login.php with mylogin.php Now I can login via /mylogin.php. The default page can be accessed without the extension at /wp-admin rather than /wp-admin.php. How can I do the same so I can login via /mylogin instead of /mylogin.php? (I'd like to do this without a plugin.)
Let's say I wanted to use transfer learning to train a model to detect object A vs everything else. In this case, do I provide 2 types of input, images of object A and images of everything else, and then have the final layer of the model output either object A or not-object A? What about in the case where I want object A vs object B vs everything else. Would it make sense in this case to provide images …
I have the required code for what I want <?php if ( is_singular() ) { <?php if (get_post_meta(get_the_ID(), 'square_image', true)) { ?> <img src="<?php echo get_post_meta($post->ID, 'square_image', true); ?>"/> <?php } else { ?> <?php the_post_thumbnail( 'thumbnail' );?> <?php } ?> } else { } ?> but I simply don't know how to make the PHP work along with HTML, and inside another PHP code. Please help me make this code work thank you
I have a trained Object detection model in the ONNX format (optimized to run on mobile phones). I have converted that model into the ORT format (which is also a format that is optimized to run on mobile phones). In ONNX's website (www.onnxruntime.ai), there are links to github repositories containing iOS and Android code for example apps that use ORT models. But code is available only for Object Detection in iOS and Image Classification in Android. This is shown in …
I am trying to re-write my WooCommerce product urls to be have the Post ID at the end, like this: /product/product-name-post-id/ I've used the code from this thread How to rewrite URI of custom post type? which is working, but we have /product/post-id-product-name/. add_filter('post_type_link', 'wpse33551_post_type_link', 1, 3); function wpse33551_post_type_link( $link, $post = 0 ){ if ( $post->post_type == 'product' ){ return home_url( 'product/' . $post->post_name . '-' . $post->ID ); } else { return $link; } } add_action( 'init', 'wpse33551_rewrites_init' …
I was using the r.quantile method in sagemath to find boundaries for a box plot. The plot was taking a long time using r.quantile. r.quantile took more than 20 seconds to find the quartiles for a data set that could be sorted and plotted point by point in less than half a second on the same machine. What is a faster alternative?
There are a lot of different keypad commands in Android. What are the known ones? Some of them are listed here : *#*#checkin#*#*: Phones home to check for updates. *#*#info#*#*: Enters a detailed phone information menu. *#*#1472365#*#*: Access to the GPS config menu (useful for patching Galaxy S GPS failure)
I have timeseries data with one value per day for a year. (there is one column with temperature data). I am using autoencoders to train a reconstruction model with mse loss. Firstly, I normalized the data using the following code: training_mean = preprocessed_data.mean() training_std = preprocessed_data.std() df_training_value = (preprocessed_data - training_mean) / training_std After this I make a sequence with data. I am not sure if it's ok to choose 32 time stepts, but otherwise I can't fit the model. …
I have timeseries data for stocks at minute intervals. What is the best way to calculate incremental growth, for example if I have a stock's price from 9am to 2pm at minute intervals, how can calcule the incremental growth. I don't want to simply calculate the difference between the price at 2pm and 9am, I want to be able to identify stocks which have risen steadily between the two time intervals
I am getting the following error from comment-reply.min.js (which seems to be a WordPress file): Uncaught TypeError: Cannot read property 'firstChild' of null at comment-reply.min.js?ver=026d5828124b6319675d89d24f212b97:2 at Object.moveForm (comment-reply.min.js?ver=026d5828124b6319675d89d24f212b97:2) at HTMLAnchorElement.a (comment-reply.min.js?ver=026d5828124b6319675d89d24f212b97:2) Is this a known issue after upgrading to WordPress 5.5 or should I start debugging it? What would be the best way to address it? We have not changed the comments template but only upgraded to the latest version of WordPress. The relevant part of the template is: <?php …