Questions tagged [norm]

NoRM is a MongoDB driver for .Net designed to provide access to strongly/statically-typed documents and collections.

NoRM is a MongoDB driver for .Net designed to provide access to strongly/statically-typed documents and collections. See https://github.com/atheken/NoRM for more details.

141 questions
83
votes
2 answers

Too much data duplication in mongodb?

I'm new to this whole NOSQL stuff and have recently been intrigued with mongoDB. I'm creating a new website from scratch and decided to go with MONGODB/NORM (for C#) as my only database. I've been reading up a lot about how to properly design your…
mike
  • 831
  • 1
  • 7
  • 3
29
votes
9 answers

MongoDB transactions?

Playing around with MongoDB and NoRM in .NET. Thing that confused me - there are no transactions (can't just tell MongoConnection.Begin/EndTransaction or something like that). I want to use Unit of work pattern and rollback changes in case something…
Arnis Lapsa
  • 45,880
  • 29
  • 115
  • 195
28
votes
5 answers

Get the 1-norm of a vector in Python

How can I calculate the 1-norm of the difference of two vectors, ||a - b||_1 = sum(|a_i - b_i|) in Python? a = [1,2,3,4] b = [2,3,4,5] ||a - b||_1 = 4
dhiv
26
votes
7 answers

What is the most mature MongoDB driver for C#?

So, there are mongodb-csharp simple-mongodb NoRM as C# drivers for MongoDB available. Which one of them is the most mature and stable one? Why would you choose one over the other two? Are they production ready?
Markus Dulghier
  • 1,580
  • 1
  • 17
  • 20
22
votes
3 answers

When to use Singleton vs Transient vs Request using Ninject and MongoDB

I'm not quite sure when I should use SingletonScope() vs TransientScope() vs RequestScope() when I do my binding in my global.cs file. I have for example my call to MongoSession (using NoRM and the mvcStarter project http://mvcstarter.codeplex.com/)…
VinnyG
  • 6,883
  • 7
  • 58
  • 76
12
votes
2 answers

When should i be opening and closing MongoDB connections?

i am very new to MongoDB and NoSQL in general and i've just started building a site with MongoDB / Norm / ASP.NET MVC 3. I am wondering how i should be scoping the connections to my Mongo database. Right now i have a Basecontroller that instanciates…
Kimpo
  • 5,835
  • 4
  • 26
  • 30
10
votes
4 answers

How should I normalize a vector in Matlab where the sum is 1?

I need to normalize a vector of N integers so that: Each value is proportional to its original value (the value will be between 0 and 1) The sum of all values is =1 For instance: If I have a vector V = [2,2,1,0] the normalized vector should…
dragonmnl
  • 14,578
  • 33
  • 84
  • 129
9
votes
5 answers

How to pass ObjectId from MongoDB in MVC.net

I'm starting a new project with Mongo, NoRM and MVC .Net. Before I was using FluentNHibernate so my IDs were integer, now my IDs are ObjectId. So when I have an Edit link my URL looks like this :…
VinnyG
  • 6,883
  • 7
  • 58
  • 76
8
votes
4 answers

MongoDB, C# and NoRM + Denormalization

I am trying to use MongoDB, C# and NoRM to work on some sample projects, but at this point I'm having a much harder time wrapping my head around the data model. With RDBMS's related data is no problem. In MongoDB, however, I'm having a difficult…
jocull
  • 20,008
  • 22
  • 105
  • 149
8
votes
2 answers

linalg.norm not taking axis argument

I am using Python 3 within Pyzo. Please could you tell me why the linalg.norm function does not recognise the axis argument. This code: c = np.array([[ 1, 2, 3],[-1, 1, 4]]) d=linalg.norm(c, axis=1) returns the error: TypeError: norm() got an…
Thomas Hopkins
  • 671
  • 2
  • 10
  • 20
7
votes
2 answers

Interpreting the effect of LK Norm with different orders on training machine learning model with the presence of outliers

( Both the RMSE and the MAE are ways to measure the distance between two vectors: the vector of predictions and the vector of target values. Various distance measures, or norms, are possible. Generally speaking, calculating the size or length of a…
I. A
  • 2,252
  • 26
  • 65
7
votes
4 answers

Norm of a arrays of vectors in python

I have this array A = array([[-0.49740509, -0.48618909, -0.49145315], [-0.48959259, -0.48618909, -0.49145315], [-0.49740509, -0.47837659, -0.49145315], ..., [ 0.03079315, -0.01194593, -0.06872366], [ 0.03054901, -0.01170179,…
Brian
  • 13,996
  • 19
  • 70
  • 94
6
votes
5 answers

How to calculate Euclidean length of a matrix without loops?

It seems like the answer to this should be simple, but I am stumped. I have a matrix of Nx3 matrix where there 1st 2nd and 3rd columns are the X Y and Z coordinates of the nth item. I want to calculate the distance from the origin to the item. …
Miebster
  • 2,365
  • 4
  • 21
  • 27
5
votes
2 answers

Compute distance in Cartesian Coordinate System in Mathematica

Analyzing Eye-movements on a screen, I set my origin to the bottom left corner of it (Hard to modify at that point). Trying to compute distance between some points and the center of the screen I use the simple formula displayed below. Problem is…
500
  • 6,509
  • 8
  • 46
  • 80
5
votes
2 answers

Polymorphism problem in MongoDb with NoRM driver

I have classes [MongoDiscriminated] public abstract class Content { public int? Id { get; set; } public int? ParentId { get; set; } public string Slug { get; set; } public string Path { get; set; } public string Title { get; set;…
Mike Koder
  • 1,898
  • 1
  • 17
  • 27
1
2 3
9 10