dimensions

How to display multiple dimensions on rows in MDX query?

。_饼干妹妹 提交于 2021-02-17 05:32:26
问题 I have measure called Sales KG in my cube and two dimensions: Groups and Formats . Is there anyway to display last ones in single row? I have this query: select [Measures].[Sales KG] on Columns, [Formats].[Format_TT].[Format_TT] on Rows from [Model] and it's working, but when I try to follow examples from Internet and turn it into: select [Measures].[Sales KG] on Columns, { ([Formats].[Format_TT].[Format_TT]), ([Groups].[Group_Name].[Group_Name]) } on Rows from [Model] Everything ends with

Changing dimnames of matrices and data frames in R

梦想的初衷 提交于 2021-02-04 15:41:29
问题 Let's say I have created the following matrix: > x <- matrix(1:20000,nrow=100) > x[1:10,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 101 201 301 401 501 601 701 801 901 [2,] 2 102 202 302 402 502 602 702 802 902 [3,] 3 103 203 303 403 503 603 703 803 903 [4,] 4 104 204 304 404 504 604 704 804 904 [5,] 5 105 205 305 405 505 605 705 805 905 [6,] 6 106 206 306 406 506 606 706 806 906 [7,] 7 107 207 307 407 507 607 707 807 907 [8,] 8 108 208 308 408 508 608 708 808 908 [9,] 9

Changing dimnames of matrices and data frames in R

坚强是说给别人听的谎言 提交于 2021-02-04 15:41:06
问题 Let's say I have created the following matrix: > x <- matrix(1:20000,nrow=100) > x[1:10,1:10] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 101 201 301 401 501 601 701 801 901 [2,] 2 102 202 302 402 502 602 702 802 902 [3,] 3 103 203 303 403 503 603 703 803 903 [4,] 4 104 204 304 404 504 604 704 804 904 [5,] 5 105 205 305 405 505 605 705 805 905 [6,] 6 106 206 306 406 506 606 706 806 906 [7,] 7 107 207 307 407 507 607 707 807 907 [8,] 8 108 208 308 408 508 608 708 808 908 [9,] 9

Error when checking target: expected dense_1 to have shape (257, 257) but got array with shape (257, 1)

*爱你&永不变心* 提交于 2021-01-29 14:10:33
问题 print(X.shape,Y.shape) #(5877, 257, 1) (5877, 257, 1) model = Sequential() model.add(LSTM(257, input_shape=(257,1),stateful=False,return_sequences=True)) model.add(Dense(257, activation='sigmoid')) model.compile(loss=losses.mean_squared_error, optimizer='adam', metrics=['accuracy']) model.fit(x=X,y=Y,epochs=100,shuffle=False) Error when checking target: expected dense_1 to have shape (257, 257) but got array with shape (257, 1) I should give 5877 frames of size 257 to lstm layer. The output

Multivariate lambda function in Python that scales with number of input variables received

守給你的承諾、 提交于 2021-01-28 11:26:35
问题 The following toy function ordinarily takes two input variables: f = lambda u1, u2 : (u1*u2)*(u1**2+u2**2) but can scale beyond the bivariate case to higher dimensions: if dim == 2: f = lambda u1, u2 : (u1*u2)*(u1**2+u2**2) if dim == 3: f = lambda u1, u2, u3 : (u1*u2*u3)*(u1**2+u2**2+u3**2) if dim == 4: f = lambda u1, u2, u3, u4 : (u1*u2*u3*u4)*(u1**2+u2**2+u3**2+u4**2) How can the lambda function be written so that it can expand itself in the call lambda u1, u2, u3, u4, ... as well as the

How to Overcome MDX Query Error When It Can't Find Specific Entity

≯℡__Kan透↙ 提交于 2021-01-27 18:52:54
问题 When i run MDX query like: select {[Measures].[all_accounts]} ON COLUMNS, {{[Country].[Country].[Country].&[italy]}* {[TD].[TD].[date].&[2016-09-02T03:00:00.000]:[TD].[TD].[date].&[2016-09-02T03:08:00.000]}, {[Country].[Country].[Country].&[Germany]}* {[TD].[TD].[date].&[2016-08-16T04:00:00.000]:[TD].[TD].[date].&[2016-08-16T04:03:00.000]}} ON ROWS FROM [cube] i get an error because 'italy' is not an entity found in Country dimension. and no result is coming back. i want to be able to run the

Get image dimensions directly from URL in C#

…衆ロ難τιáo~ 提交于 2020-12-29 05:42:53
问题 I'm trying to get dimensions from a picture directly from the web using this code: string image = @"http://www.hephaestusproject.com/.../csharp3.png"; byte[] imageData = new WebClient().DownloadData(image); MemoryStream imgStream = new MemoryStream(imageData); Image img = Image.FromStream(imgStream); int wSize = img.Width; int hSize = img.Height; It works but the performance is terrible because I need to download many images just to get their dimensions. Is there a more efficient way to do

Get image dimensions directly from URL in C#

生来就可爱ヽ(ⅴ<●) 提交于 2020-12-29 05:39:43
问题 I'm trying to get dimensions from a picture directly from the web using this code: string image = @"http://www.hephaestusproject.com/.../csharp3.png"; byte[] imageData = new WebClient().DownloadData(image); MemoryStream imgStream = new MemoryStream(imageData); Image img = Image.FromStream(imgStream); int wSize = img.Width; int hSize = img.Height; It works but the performance is terrible because I need to download many images just to get their dimensions. Is there a more efficient way to do

Problems with accessing double elements in a list in R

寵の児 提交于 2020-11-29 19:20:35
问题 I have performed a bootstrapping with 2.000 resamples of the Lee Carter model for mortality projection. The question is not specific for mortality studies, but on more general dimensions in R. After performing the bootstrapping I get a list with 2000 elements, each for every of 2.000 re-estimations of the model. For each model, there are estimates of my 3 variables: a_x, b_x and k_t. Both a_x and b_x are age-specific, so the "x" denotes an age in the interval [0:95]. I would now like to plot

Problems with accessing double elements in a list in R

依然范特西╮ 提交于 2020-11-29 19:18:30
问题 I have performed a bootstrapping with 2.000 resamples of the Lee Carter model for mortality projection. The question is not specific for mortality studies, but on more general dimensions in R. After performing the bootstrapping I get a list with 2000 elements, each for every of 2.000 re-estimations of the model. For each model, there are estimates of my 3 variables: a_x, b_x and k_t. Both a_x and b_x are age-specific, so the "x" denotes an age in the interval [0:95]. I would now like to plot