hierarchical

Passing different forecasting method to hierarchical time series forecast in R?

时光总嘲笑我的痴心妄想 提交于 2019-12-07 04:18:50
问题 This question was migrated from Cross Validated because it can be answered on Stack Overflow. Migrated 4 years ago . I have a hierarchical time series, the bottom level series of which all exhibit intermittent demand. It seems advantageous to use Hyndman's HTS package for optimal combination within the hierarchy. It also seems advantageous to use Kourentzes' MAPA package for multiple aggregation prediction of the intermittent demand. In essence, I want to do something like: forecast(my_hts,

Create a spring boot application with multiple child contexts

折月煮酒 提交于 2019-12-06 18:33:08
问题 I'm trying to create an application using spring boot with an hierarchical application context. My current main method looks like: public static void main(String[] args) { new SpringApplicationBuilder(TestApplication.class) .child(AuditServiceConfiguration.class).web(true) .child(TaskServiceConfiguration.class).web(true) .run(args); } and the two children configurations are annotated with: @EnableAutoConfiguration @Configuration The idea is to have a parent context containing all common beans

hierarchical cluster labeling with plots

喜你入骨 提交于 2019-12-06 08:37:38
I have a distance matrix for ~20 elements, which I am using to do hierarchical clustering in R. Is there a way to label elements with a plot or a picture instead of just numbers, characters, etc? So, instead of the leaf nodes having numbers, it'd have small plots or pictures. Here is why I'm interested in this functionality. I have 2-D scatterplots like these (color indicates density) http://www.pnas.org/content/108/51/20455/F2.large.jpg (Note that this is not my own data) I have to analyze hundreds of such 2-D scatter plots, and am trying out various distance metrics which I'm feeding on to

What is the best way to group and aggregate and sum tree data?

安稳与你 提交于 2019-12-06 05:41:14
Given a self referencing table Item ------------- Id (pk) ParentId (fk) With a related table of associated values ItemValue ------------- ItemId (fk) Amount And some sample data Item ItemValues Id ParentId ItemId Amount -------------------- ---------------------- 1 null 1 10 2 1 3 40 3 1 3 20 4 2 4 10 5 2 5 30 6 null 7 6 8 7 I need a sproc to take Item.Id and return the direct children with sums of all ItemValue.Amounts for the them, their children and their children all the way down the tree. For example, if 1 is passed in, the tree would be 2, 3, 4, 5 the direct children are 2, 3 the output

PHP Multidimensional array to unordered list, building up url path

∥☆過路亽.° 提交于 2019-12-05 23:47:42
问题 I have a multidimensional array in PHP produced by the great examples of icio and ftrotter (I am use ftrotterrs array in arrays variant): Turn database result into array I have made this into a unordered list width this method: public function outputCategories($categories, $startingLevel = 0) { echo "<ul>\n"; foreach ($categories as $key => $category) { if (count($category['children']) > 0) { echo "<li>{$category['menu_nl']}\n"; $this->outputCategories($category['children'], $link , $start,

Passing different forecasting method to hierarchical time series forecast in R?

守給你的承諾、 提交于 2019-12-05 14:04:37
I have a hierarchical time series, the bottom level series of which all exhibit intermittent demand. It seems advantageous to use Hyndman's HTS package for optimal combination within the hierarchy. It also seems advantageous to use Kourentzes' MAPA package for multiple aggregation prediction of the intermittent demand. In essence, I want to do something like: forecast(my_hts, method='comb', fmethod='MAPA') However, it is unclear to me if / how I can combine the two, since forecast.gts() only accepts fmethod=c("ets", "arima", "rw"). Is there a clever way to pass different forecasting methods to

how to get the hierarchical menu from mysql

可紊 提交于 2019-12-05 05:41:34
问题 I have a table having hierarchical menus like "id" "parent_id" "name" 1 0 menu 2 1 item1 3 2 item1_1 4 1 item2 5 4 item2_1 ... ... and I have 100s of menu items here. In order to get all items in an array I have to write a recursive function like this getmenu function(parent_id = 1) { $items = mysql_query("SELECT id FROM table WHERE parent_id = " + parent_id); while ($item = msyql_Fetch_assoc($items)) { ...here I put them in array and call recursive function again to get sub items... getmenu(

Mysql sorting Hierarchical data

半城伤御伤魂 提交于 2019-12-05 03:27:04
问题 I have a question and working last week with this and couldnt solve yet.. I can query submenus with join but i cant order it. I have a table like this | id | name | parent | order | |-------------------------------------------| | 1 | menu1 | 0 | 1 | | 2 | submenu1 | 1 | 2 | | 3 | submenu2 | 1 | 1 | | 4 | subsubmenu | 2 | 1 | | 5 | subsubsubmenu:) | 4 | 1 | | 6 | menu2 | 0 | 3 | | 7 | menu3 | 0 | 2 | |-------------------------------------------| I wanna get something like this. | - menu1 | -

Create a spring boot application with multiple child contexts

倾然丶 夕夏残阳落幕 提交于 2019-12-04 23:49:45
I'm trying to create an application using spring boot with an hierarchical application context. My current main method looks like: public static void main(String[] args) { new SpringApplicationBuilder(TestApplication.class) .child(AuditServiceConfiguration.class).web(true) .child(TaskServiceConfiguration.class).web(true) .run(args); } and the two children configurations are annotated with: @EnableAutoConfiguration @Configuration The idea is to have a parent context containing all common beans and each child context to run its own MVC while being isolated from its siblings. Unfortunately when I

How To Get All children and itself from Hierarchical data with CTE In SQL Server 2005 using stored procedure

我的未来我决定 提交于 2019-12-04 16:33:22
I have many similar structure tables like this: CREATE TABLE [dbo].[tbl_Hierarchy]( [ID] [int] NOT NULL, [ParentID] [int] NOT NULL, [Text] [nvarchar](100) NOT NULL, --other field irrelevant to my question ) INSERT INTO dbo.tbl_Hierarchy VALUES(1,0,'parent1') INSERT INTO dbo.tbl_Hierarchy VALUES(2,0,'parent2') INSERT INTO tbl_Hierarchy VALUES(3,1,'child1') INSERT INTO tbl_Hierarchy VALUES(4,3,'grandchild1') INSERT INTO tbl_Hierarchy VALUES(5,2,'child2') Can you help me writing such as a stored procedure including two parameters with table name and ID ? For example, when executing EXEC usp