I'm using Python and I have a training set of sequences of this shape: (None, 9, 25), where: 9 are rows representing years from 2012 to 2020 25 are features. So each of this 25 features has a value for each year going from 2012 to 2020. As target (labels) I have, for each sequence of (9,25), a list of 9 elements representing a number (either 0 or 1) associated to each year, so a possible label for a certain …
What are some podcasts which are related to data science? This is a similar question to the reference request question on CrossValidated. Details/rules: The podcasts (the theme and the episodes) should be related to data science. (For example: A podcast which is about some other domain, with an episode which speaks about data science in that domain, is not a good reference/answer.) Personal opinions/reviews (if any) would be very helpful too.
I am trying to export the plugin options that I created. if(!get_option('myplugin_opts') ){ add_option('myplugin_opts'); } and also I want to know how I could import the options to WordPress for my plugin, thanks
IN my fresh wordpress install via docker. Everytime i hit localhost it gets redirected to http://localhost/wp-admin/install.php Now its missing the wp , the url should be http://localhost/wp/wp-admin/install.php My Env variable is like this WP_ENV=development WP_HOME=http://localhost/wp WP_SITEURL=${WP_HOME}/wp my apache vhost file is <VirtualHost *:80> ServerName http://localhost DocumentRoot ${APACHE_DOCUMENT_ROOT} <Directory ${APACHE_DOCUMENT_ROOT}> AllowOverride all </Directory> CustomLog /var/log/apache2/local-access.log "combined" ErrorLog /var/log/apache2/local-error.log </VirtualHost>
I'm having a problem in one site that I am making with wordpress/woocommerce, on product page I want to hide Size and Color from that section, unfortunately I did not succeed.
I am customizing the admin panel of WordPress. I have users with roles to only write to 3 categories. I would like to design 3 buttons or divs to create a new post but each one for a different category. That in the dashboard. I will have a different dashboard for role user Any idea?
OK, let's say we have well-labeled images with non-discrete labels such as brightness or size or something and we want to generate images based on it. If it were done with a discrete label it could be done like: def forward(self, inputs, label): self.batch = inputs.size(0) h = self.res1(inputs) h = self.attn(h) ... h = self.res5(h) h = torch.sum((F.leaky_relu(h,0.2)).view(self.batch,-1,4*4), dim=2) outputs = self.fc(h) if label is not None: embed = self.embedding(label) outputs += torch.sum(embed*h,dim=1,keepdim=True) The embedding can be made to …
I have this linear model with predictors that I need to prove are statistically significant and pass the necessary lm assumptions. I know for a single dataset, I can use various LM tests, but the problem is I have several hundred datasets which cannot be combined. Coefficients may be different for each dataset, but I just need to prove(or disprove) that the covariates can be used for lm across all models. I'm assuming I shouldn't run tests on each LM …
I have a different kind of scenario then the typical custom fields (I suppose). I am not getting custom values (fields) from user in the form rather I have an implementation which adds: ColorName Size City These are from a custom product flow which adds custom attributes to the cart, here is how I am doing that: add_action('wp_ajax_wdm_add_user_custom_data_options', 'wdm_add_user_custom_data_options_callback'); add_action('wp_ajax_nopriv_wdm_add_user_custom_data_options', 'wdm_add_user_custom_data_options_callback'); function wdm_add_user_custom_data_options_callback() { // print_r($_POST); $productIDM = $_POST['product_id']; // case swith switch ($productIDM) { case "Ace Dura Silk": $productID …
I'm having trouble hiding my header on mobile devices. My wordpress theme does not have an option to hide it, so I was looking at the theme's header.php file if there was anything I could add to it. Haven't been able to figure out a solution, any ideas?? Thanks <?php /** * The header for our theme * * This is the template that displays all of the <head> section and everything up until <div id="content"> * * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials …
I am trying to pull images as attachments from a particular post (custom post), ...and I'm using the example within WordPress codex codex example to display all images as a list ...except the images in that post keep repeating about 3 or 4 times (I have a total of 7 images attached to that post). no matter what I set the numberposts to or the post_per_page, I keep getting repeated images, about 28 when I should only have the seven. …
I have a wordpress subdomain on my site: https://cdn.example.com, however I am proxying this site to be displayed on my root domain for SEO purposes. Whenever I navigate to https://example.com/blog I am shown content from the CDN subdomain. However, I updated the wordpress site URL to be https://example.com/blog so that the hyperlinks are directed to the blog subpath. This works fine, but breaks the functionality for updating posts. It is attempting to send the update requests to the wp API …
I am trying to build a regression tree with 70 attributes where the business team wants to fix the first two levels namely country and product type. To achieve this, I have two proposals: Build a separate tree for each combination of country and product type and use subsets of the data accordingly and pass on to respective tree for prediction. Seen here in comments. I have 88 levels in country and 3 levels in product type so it will …
I have created a custom post type with an image gallery upload. Now I am trying to display the gallery on the front end. This is what I have so far that works to display 1 image, but if multiple images are uploaded all the URLs get stuck in the src tag. So I'm guessing I should loop through that array and spit out each one separately? Would that be the route to go and if so how can I …
I have created custom .php file that should show list of all posts that correspond to user's choice. I have 3 custom fields and 1 category condition. I've tried all the queries i could possibly find in wordpress codex database but nothing seems to work. I've created 3 custom fields: a_field,a_fieldd,a_fielddd (and ofcourse i have posts with those fields already posted for the test) now I just want to show all of the posts with custom fields with specified values …
I'm fine-tuning pre-trained gpt-2 for text summarization. The dataset contains 'text' and 'reference summary'. So my question is how to add special tokens to get the right input format. Currently I'm thinking doing like this: example1 <BOS> text <SEP> reference summary <EOS> , example2 <BOS> text <SEP> reference summary <EOS> , ..... Is this correct? If so, a follow-up question would be whether the max-token-length(i.e. 1024 for gpt-2) means also the concatenate length of text and reference summary? Any comment …
I want to incrementally train my pre-trained autoencoder model on data being received every minute. Based on this thread, successive calls to model.fit will incrementally train the model. However, the reconstruction error and overall accuracy of my model seems to be getting worse than what it initially was. The code looks something like this: autoencoder = load_pretrained_model() try: while True: data = collect_new_data() autoencoder = train_model(data) # Invokes autoencoder.fit() time.sleep(60) except KeyboardInterrupt: download_model(autoencoder) sys.exit(0) The mean reconstruction error when my …
I am trying to create a deep learning model that predicts the future price of crypto currencies based on past data. I downloaded the Open, High, Low, Close and Volume (OHLCV) data from yahoo finance and made it stationary by differencing it. Now I also want to calculate some technical indicators from the OHLCV data. For example the simple or exponential moving average. I'm guessing that the calculated features also need to be stationary. Is that correct? So do I …
I am writing a function to standardize the data and I found out that we can choose either ddof = 0 or ddof = 1, so I got confused that which one to choose and why? Does this make any difference?
I want to know if Deep learning can be used for Resume Parsing and scoring of the resume. Currently what I am doing is extracting the text from pdf or image using OCR/tesseract and finding the features like Email, Mobile No, Skills, Tenure, No of Companies, Awards etc from the text. So I have close to 100 features which are important for scoring the resume. Can we do similar thing using Deep learning and will the accuracy be better ? …
I'm working on wordpress project, Theme have some demos i've added add_menu_page where all of the demos stored e.g pictures and names, I know the REST-API where i've added condition if theme license is correct then give file, But i don't know how to add that file in theme directory of wordpress when user will click and remove previous one or overwrite previous file.
I am working with custom posts to create a 'document' custom post type and then trying to assign the category during wp_insert_post, have tried using both post_category and tax_input to no success. I am registering the custom post as below, keeping in the relevant bits below so it does have $labels defined and a few more $args that I have stripped out. My research has indicated that permissions need to be created in the custom post type before assigning them …
The backstory is I noticed the homepage was generating infinite paginated pages. This is a custom built theme. I was using index.php and WP_Query to create 2 small 5 post loops. I figured WP_Query was pulling all of the qualifying posts and then limiting to the most recent 5, so I switched to get_posts with a foreach loop, since my understanding is that doesn't fetch all the posts, only the ones you ask for (and therefore no need for pagination). …
I have a custom taxonomy with custom meta. I have added the custom meta values to columns in the admin list page just fine. But if I search for values that are in these columns nothing is found. I'm assuming I need to use pre_get_terms, but am having trouble figuring out how to include the meta in the query. Here is what I am trying to do to test one of the fields, but results are still negative. add_action( 'pre_get_terms', …
I am using the implementation of PPO2 in stable-baselines (a fork of OpenAI's baselines) for a Reinforcement Learning problem. My observation space is $9x9x191$ and my action space is $144$. Given a state, only some actions are "legal". If an "illegal" action is taken, the environment will return the same state. Think of it as the game of Go, where you try to place a stone on an intersection that is already occupied. When a legal action is taken, it …
So this is more a philosophical question than anything, and if I'm asking this in the wrong place, I'm happy to remove the post: What's the best way to use a parent page for structure while keeping that page inaccessible to users? I'm running into two issues: First, I want to use the parent page in the main menu so that I can take advantage of WordPress's current-menu-parent and like classes for styling purposes. I know that normally you can …
I use a Builder plugin on the site. Members are editors and can create their own page. I want to disable Gutenberg so that they can only edit pages with Buldir. I would also disable the properties of the page for them and I would enter it automatically. When I create a new page, I disable comments, the template is Blank Page, do not access the Custom fields. You can practically just add a featured image and title to your …
I'm training a ResNet50 for image classification and I'm interested in decreasing the dimensionality of the embedded layer, in order to apply some clustering techniques. The suggested dimension is something in the range 64-256, so I thought I'd start from 128. I'm using PyTorch. After loading the pretrained ResNet50 from the official release I would usually do this: model = t.load(cfg.resnet_path) model.fc = nn.Sequential(nn.Linear(in_features = 2048, out_features = num_classes, bias = True)) Everything worked and I reached an accuracy of …
I have a problem with images. I can see my uploaded images, as previously, through the media library. I can access each image by clicking on "edit". But if I then click on "View Attachment Page", I am taken to the "404! We couldn't find the page!" message. This applies to all images in the library. At the same, images in some posts (but not all) are behaving differently from before. It used to be possible for readers to click …
I would like to create a multilabel text classification algorithm using SpaCy text multi label. I am unable to understand the following questions: How to convert the training data to SpaCy format i.e I have 8 categories After converting, how do we use that to train custom categories and apply different models
My multisite WP website is redirecting all the 404, wp-cron.php, and admin-ajax.php to the homepage when the user is not logged in. .htaccess rules: RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . index.php [L] Please help me fix it. Thank you.
I'm working on CRM data, did some cleaning, encoding and ran a decision tree classifier from which i plotted a feature_importance graph From that I found that Sales person column is one of the important feature which is highly cardinal column(around 1300+ categories/sales person). Now i'm trying to generate some insights on this column with respect to target column(binary values). Would like to know in general how to create insights from such a large categorical column? P.S: Other columns are …
I tried to implement LSTM model for time-series prediction. Below is my trial code. This code runs without error. metrics = ['mean_squared_error', 'mean_absolute_error', 'mean_absolute_percentage_error'] # define model model = Sequential() model.add(LSTM(100, activation='relu', input_shape=(n_past, 6), return_sequences=True)) model.add(LSTM(100, activation='relu', return_sequences=True)) model.add(LSTM(50, activation='relu')) model.add(Dense(2, activation='relu')) model.compile(optimizer='adam', loss='mse', metrics=metrics) model.summary() ) The forecast correctly predicts the peaks, but the constant values should be 0 and you cannot predict it. However, prediction is extremely poor. How to improve the predictin? Do you have any ideas …