Search Results

Search found 4708 results on 189 pages for 'dot matrix'.

Page 22/189 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • Clustering [assessment] algorithm with distance matrix as an input

    - by Max
    Can anyone suggest some clustering algorithm which can work with distance matrix as an input? Or the algorithm which can assess the "goodness" of the clustering also based on the distance matrix? At this moment I'm using a modification of Kruskal's algorithm (http://en.wikipedia.org/wiki/Kruskal%27s_algorithm) to split data into two clusters. It has a problem though. When the data has no distinct clusters the algorithm will still create two clusters with one cluster containing one element and the other containing all the rest. In this case I would rather have one cluster containing all the elements and another one which is empty. Are there any algorithms which are capable of doing this type of clustering? Are there any algorithms which can estimate how well the clustering was done or even better how many clusters are there in the data? The algorithms should work only with distance(similarity) matrices as an input.

    Read the article

  • Static Typing and Writing a Simple Matrix Library

    - by duckworthd
    Aye it's been done a million times before, but damnit I want to do it again. I'm writing a simple Matrix Library for C++ with the intention of doing it right. I've come across something that's fairly obvious in mathematics, but not so obvious to a strongly typed system -- the fact that a 1x1 matrix is just a number. To avoid this, I started walking down the hairy path of matrices as a composition of vectors, but also stumbled upon the fact that two vectors multiplied together could either be a number or a dyad, depending on the orientation of the two. My question is, what is the right way to deal with this situation in a strongly typed language like C++ or Java?

    Read the article

  • Why did this work? ( php dot notation )

    - by Daniel
    Hi, I was writing some php code after a long sint doing ruby and I accidently wrote this: [root@ip-10-160-47-98 test]# cat run.php <?php class MyTest { public function run() { var_dump(this.test); } } $object = new MyTest(); $object->run(); [root@ip-10-160-47-98 test]# php run.php string(8) "thistest" [root@ip-10-160-47-98 test]# Now, this.test should have been $this-test, but the compiler was actually happy to let this run. Does anyone know how (this.test) got converted into a string "thistest"? Compiled and run on php 5.3.2 amazon instance ami-e32273a6 (CentOS 5.4) -daniel

    Read the article

  • Confusion Matrix with number of classified/misclassified instances on it (Python/Matplotlib)

    - by Pinkie
    I am plotting a confusion matrix with matplotlib with the following code: from numpy import * import matplotlib.pyplot as plt from pylab import * conf_arr = [[33,2,0,0,0,0,0,0,0,1,3], [3,31,0,0,0,0,0,0,0,0,0], [0,4,41,0,0,0,0,0,0,0,1], [0,1,0,30,0,6,0,0,0,0,1], [0,0,0,0,38,10,0,0,0,0,0], [0,0,0,3,1,39,0,0,0,0,4], [0,2,2,0,4,1,31,0,0,0,2], [0,1,0,0,0,0,0,36,0,2,0], [0,0,0,0,0,0,1,5,37,5,1], [3,0,0,0,0,0,0,0,0,39,0], [0,0,0,0,0,0,0,0,0,0,38] ] norm_conf = [] for i in conf_arr: a = 0 tmp_arr = [] a = sum(i,0) for j in i: tmp_arr.append(float(j)/float(a)) norm_conf.append(tmp_arr) plt.clf() fig = plt.figure() ax = fig.add_subplot(111) res = ax.imshow(array(norm_conf), cmap=cm.jet, interpolation='nearest') cb = fig.colorbar(res) savefig("confmat.png", format="png") But I want to the confusion matrix to show the numbers on it like this graphic (the right one): http://i48.tinypic.com/2e30kup.jpg How can I plot the conf_arr on the graphic?

    Read the article

  • Creating a Large Matrix in ff

    - by Ryan Rosario
    I am trying to create a huge matrix in ff, and I know that ff is good for this sort of thing. But, there is a major problem. The dimensions of the matrix exceed .Machine$max_integer! I am running on a 64 bit machine, using 64bit R and 64bit ff. Is there any way to get around this problem? It's been suggested that R is using the MAXINT value from stdint.h. Is there any way to fix this without changing that file and possibly breaking build? > ffMatrix <- ff(vmode="boolean", dim=c(1e10,1e10)) Error in if (length < 0 || length > .Machine$integer.max) stop("length must be between 1 and .Machine$integer.max") : missing value where TRUE/FALSE needed In addition: Warning message: In ff(vmode = "boolean", dim = c(1e+10, 1e+10)) : NAs introduced by coercion > 1e+10 > .Machine$integer.max [1] TRUE

    Read the article

  • Projection matrix + world plane ~> Homography from image plane to world plane

    - by B3ret
    I think I have my wires crossed on this, it should be quite easy. I have a projection matrix from world coordinates to image coordinates (4D homogeneous to 3D homgeneous), and therefore I also have the inverse projection matrix from image coordinates to world "rays". I want to project points of the image back onto a plane within the world (which is given of course as 4D homogeneous vector). The needed homography should be uniquely identified, yet I can not figure out how to compute it. Of course I could also intersect the back-projected rays with the world plane, but this seems not a good way, knowing that there MUST be a homography doing this for me. Thanks in advance, Ben

    Read the article

  • IIS errors since upgrading to dot net 4

    - by user376085
    Back in October we upgraded one of our sites (on IIS 6) from .net 3.5 to .net 4.0. Since then we have been getting the following warning and error pretty much everyday: Warning: ISAPI 'c:\windows\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll' reported itself as unhealthy for the following reason: 'Deadlock detected'. Error: It is not possible to run two different versions of ASP.NET in the same IIS process. Please use the IIS Administration Tool to reconfigure your server to run the application in a separate process. We have checked all applications and ensured that they are running on the correct versions of ASP.NET and also in their own separate app pools. We have looked at the IIS logs at the time the errors are recorded but this doesn't give any clues as to the issue. Is there a tool available that could give us more information as as to which application is causing the errors and what was happening at the time?

    Read the article

  • Immutable Dot Net strings

    - by klork
    I usually define my string variables in vb.net as Dim f_sName as string=String.Empty f_sName = "foo" Given the immutable nature of strings in .net, is there a better way to initialize strings and deal with the "Variable 'f_sName ' is used before it has been assigned a value. A null reference exception could result at runtime." warning? Also for classes that do not have constructors which accept no arguments such as System.Net.Sockets.NetworkStream, what is the best way to define and initialize a variable of that type? All comments are highly appreciated. Thanks

    Read the article

  • Is SQL server the best DB for Storing and comparing images in database for a small ecommerce applica

    - by iecut
    I have been trying to create a small e-commerce web based application using MS Dot Net framework. The application will let the user allow to store the image of their product that they want to sell or purchase, then they will have the option to upload the image of a particular product and compare that image with the similar images in the database. So my two main concerns are: - Is MS SQL a good option to store and compare the images. - Is the any other better database that can do the same work with less complexity of work and that is also easy to integrate with MS dot net framework.

    Read the article

  • Dot Net Nuke app_offline randomly being generated

    - by chelfers
    We have had multiple DNN sites running for quite a few months now without any issues. Twice in the last 3 days our sites have gone offline by the addition of the app_offline.htm file in the root dir. There is only one developer with access to the sites at a coding / directory viewing level and the file is generated at weird times times when he is NOT accessing our network. We are not publishing anything to the server ( and have not published any .net code in days ), upgrading, changing code, or even modifying content. Has anyone run into this issue?

    Read the article

  • Asp Dot Net : IHttpModule + m_context.Server.Transfer = session state error

    - by tinky05
    I have an IHttpModule that implements IRequiresSessionState. The session state is at "on" on the page directive and I also added it to the web.config. In the method "OnBeginRequest" in the IHttpModule, I make a Server.Transfer but I get the error : Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. When I access the page directly or with a Response.Redirect, there is no error. Any idea?

    Read the article

  • Tool to diagonalize large matrices

    - by Xodarap
    I want to compute a diffusion kernel, which involves taking exp(b*A) where A is a large matrix. In order to play with values of b, I'd like to diagonalize A (so that exp(A) runs quickly). My matrix is about 25k x 25k, but is very sparse - only about 60k values are non-zero. Matlab's "eigs" function runs of out memory, as does octave's "eig" and R's "eigen." Is there a tool to find the decomposition of large, sparse matrices? Dunno if this is relevant, but A is an adjacency matrix, so it's symmetric, and it is full rank.

    Read the article

  • Get positions for NAs only in the "middle" of a matrix column

    - by Abiel
    I want to obtain an index that refers to the positions of NA values in a matrix where the index is true if a given cell is NA and there is at least one non-NA value before and after it in the column. For example, given the following matrix [,1] [,2] [,3] [,4] [1,] NA 1 NA 1 [2,] 1 NA NA 2 [3,] NA 2 NA 3 the only value of the index that comes back TRUE should be [2,2]. Is there a compact expression for what I want to do? If I had to I could loop through columns and use something like min(which(!is.na(x[,i]))) to find the first non-NA value in each column, and then set all values before that to FALSE (and the same for all values after the max). This way I would not select leading and trailing NA values. But this seems a bit messy, so I'm wondering if there is a cleaner expression that does this without loops.

    Read the article

  • Perl - getting a value from a hash where the key has a dot

    - by imerez
    I have a hash in Perl which has been dumped into from some legacy code the name of the key has now changed from simply reqHdrs to reqHdrs.bla $rec->{reqHdrs.bla} My problem is now I cant seem to access this field from the hash any ideas? The following is my error Download Script Output: Bareword "reqHdrs" not allowed while "strict subs" in use

    Read the article

  • DOT NET NUKE URL PROBLEM

    - by user311166
    URL's are posting in address bar however all pages show up as the home page. I tried to add a document to the documents tab and after seeing inheritance overrides I canceled out of it and now all the pages post the home page.

    Read the article

  • extract data from an array without using loop in R

    - by Manolo
    I have a vector v with row positions: v<-c(10,3,100,50,...) with those positions I want to extract elements of a matrix, having a column fixed, for example lets suppose my column number is 2, so I am doing: data<-c() data<-c(matrix[[v]][[2]]) matrix has the data in the following format: [[34]] [1] "200_s_at" "4853" "1910" "3554" "2658" So for example, I want to extract from the row 342 the value 1910 only, column 2, and do the same with the next rows but I got an error when I want to do that, is it possible to do it directly? or should I have a loop that read one by one the positions in v and fill the data vector like: #algorithm for i<-1 to length(v) pos<-v[i] data[[i]]<-c(matriz[[pos]][[2]]) next i Thanks

    Read the article

  • Compute rolling window covariance matrix

    - by user1665355
    I am trying to compute a rolling window (shifting by 1 day) covariance matrix for a number of assets. Say my df looks like this: df <- data.frame(x = 0:4, y = 5:9,z=1:5,u=4:8) How would a possible for loop look like if I want to calculate a covariance matrix on a rolling basis by shifting the rolling window by 1 day? Or should I use some apply family function? What time series class would be preferrable if I want to create a time series object for the loop above? I simply can't get it... Best Regards

    Read the article

  • Generate (in R) a matrix of all possible outcomes for throwing n dice (ignoring order)

    - by Brani
    In cases where order does matter, it's rather easy to generate the matrix of all possible outcomes. One way for doing this is using expand.grid as shown here. What if it doesn't? If I'm right, the number of possible combinations is (S+N-1)!/S!(N-1)!, where S is the number of dice, each with N sides numbered 1 through N. (It is different from the well known combinations formula because it is possible for the same number to appear on more than one dice). For example, when throwing four six-sided dice, N=6 and S=4, so the number of possible combinations is (4+6-1)!/4!(6-1)! = 9!/4!x5! = 126. How can I generate a matrix of these 126 possible outcomes? Thank you.

    Read the article

  • Generate a matrix of all possible outcomes for throwing n dice (ignoring order)

    - by Brani
    In cases where order does matter, it's rather easy to generate the matrix of all possible outcomes. One way for doing this is using expand.grid as shown here. What if it doesn't? If I'm right, the number of possible combinations is (S+N-1)!/S!(N-1)!, where S is the number of dice, each with N sides numbered 1 through N. (It is different from the well known combinations formula because it is possible for the same number to appear on more than one dice). For example, when throwing four six-sided dice, N=6 and S=4, so the number of possible combinations is (4+6-1)!/4!(6-1)! = 9!/4!x5! = 126. How can I generate a matrix of these 126 possible outcomes? Thank you.

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >