I have a data set with only x,y coordinates and x' and y values are coming to me by another algorithm
I have a data set with only x,y coordinates and x' and y values are coming to me by another algorithm. How can I classify this incoming value using knn and svm? enter image description here
do you know?
how many words do you know
See also questions close to this topic

Geofecncing in flutter?
My application uses geofencing, it shows notifications when the phone enters certain areas (geofences). Code works perfectly fine when phone is unlocked. how to add geofencing in flutter app when the phone is locked and app is in foreground? .....

Unable use folium if longitude latitude is object
I have data like this
latitude longitude status 6,23001807 106,8521888 Fraud 3,2102966 105,3528608 Normal latitude object longitude object status object dtype: object
I can't use folium with this kind of problem
# Creating the map and adding points to it map = folium.Map(location=[fraud_locations.latitude.mean(), fraud_locations.longitude.mean()], zoom_start=14, control_scale=True) for index, location_info in fraud_locations.iterrows(): folium.Marker([location_info["latitude"], location_info["longitude"]], popup=location_info["status"]).add_to(map)
Please help, I'm just learning to make a location map. Thank you

Offline Location Update is not working in iOS 14 and above
I am working on the Location update in my application When the app is with internet connection location update (didUpdateLocation) is called. But when the app goes offline, Location update delegate is not called in iOS 14 . I am not getting the latitude and longitude. Any idea why this is happening or is this the process of location manager?
locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; locationManager.desiredAccuracy = kCLLocationAccuracyThreeKilometers; if([locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)]){ [locationManager requestWhenInUseAuthorization]; }else{ [locationManager startUpdatingLocation]; }  (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations { CLLocation *location = [locations lastObject]; lattitude = [NSString stringWithFormat:@"%f", location.coordinate.latitude] ; longitude = [NSString stringWithFormat:@"%f",location.coordinate.longitude]; [locationManager stopUpdatingLocation]; }

When applying SVM classifier to unseen new data, I encounter an error message. (R user)
Thanks for your interest and help.
I built a Kernel SVM classifier with 30,000 rows of the training dataset by software R.
I used around 2,000word features to train the classifier. It worked very well.
But, when I am trying to apply the classifier to a new text dataset, the problem occurred.
Because the new text documentterm matrix does not contain all 2000word features in the classifier (columns).
Of course, I can build a classifier with a small number of word features. Then, it works on the new text data, but the performance is not that good.
How do you solve this problem?
So, how do you solve the problem that the new text dataset does not have all the word features in the SVM classifier?

Could I use Multiclass SVM for an inference problem?
I have a problem in which I would like to find the probability of belonging to each class and I have 3 classes. I know we can consider a Bayesian inference and solve it but I was thinking maybe I could use a multiclass SVM instead? What do you suggest in general to improve upon the Bayesian inference method?

Warning: Maximum number of function evaluations has been exceeded (SVM uzawa implementation)
I'm curretnly implementing an uzawa algorithm using python in order to solve Lagrangian equation. The minimization part is done using NelderMead Optimization. The error 'Warning: Maximum number of function evaluations has been exceeded.' is shown after some iterations and the results seem off.
import numpy as np import scipy.optimize as optimize import sympy I1 = np.array([1.5,72,1]) I2 = np.array([1.75, 92,1]) I3 = np.array([1.6, 60,+1]) I4 = np.array([1.8,72,+1]) g1 = lambda w : 1  np.matmul(w,I1) g2 = lambda w : 1  np.matmul(w,I2) g3 = lambda w : 1 + np.matmul(w,I3) g4 = lambda w : 1 + np.matmul(w,I4) M = lambda w : np.array([g1(w),g2(w),g3(w),g4(w)]) p = 4 l = np.zeros(4) w = np.array([1,2,3]) n_2 = lambda l1,l2 : np.sum(np.power(l1l2,2)) aux = np.ones(4) for k in range(pow(10,5)): L = lambda w : 0.5*np.sum(np.power(w,2)) + np.matmul(l,M(w)) res = optimize.minimize(L, w, method='neldermead',options={'xatol': 1e8, 'disp': True}) w = res.x aux = l l = l + p*M(w) for i in range(len(l)): if l[i]<0: l[i] = 0

how to solve the difference length between train and class
i was trying to use KNN for titanic data, using R Below is my codes:
df = read_spss("Desktop/titanicTrain.sav") str(df) view(df) anyNA(df) df=na.omit(df) anyNA(df) Survived.subset=df[c("Age","Sex","Survived")] df1=df%>% select(Age,Sex,Survived) view(df1) view(Survived.subset) df1=na.omit(df1) #Normalize normalize=function(x){ return((xmin(x))/(max(x)min(x))) } Survived.subset.n=as.data.frame(lapply(Survived.subset[,1],normalize)) head(Survived.subset.n) library(foreign) set.seed(123)#to get the same random sample dat.d=sample(1:nrow(Survived.subset.n),size=nrow(Survived.subset.n)*0.7,replace=FALSE)#random selection of 70% of data. train.survived=Survived.subset[dat.d,]#70% training data test.survived=Survived.subset[dat.d,]# remaining 30% test data train.survived_labels=Survived.subset[dat.d,3] test.survived_labels=Survived.subset[dat.d,3] library(class)# class package as it carries KNN function NROW(train.survived_labels) knn.22=knn(train=train.survived, test= test.survived,cl=train.survived_labels,k=22) knn.23=knn(train=train.survived, test= test.survived,cl=train.survived_labels,k=23)
But I received an error:
Error in knn(train = train.survived, test = test.survived, cl = train.survived_labels, : 'train' and 'class' have different lengths

i am getting different lengths error in building knn model in r
here i am posting the code
library(class) > predictedknn<knn(train=social,test=socialtest,cl=social,k=3) Error in knn(train = social, test = socialtest, cl = social, k = 3) : 'train' and 'class' have different lengths
lengths are be like:
 social = 280 objs with 3 vairables
 socialtest =120 onjs with 3 vairables
i am trying to build knn model guys please help me

Issue wtth Cvvalue Crossford validation for knn from 1 to 30 for 10 folds
I have a question on R Crossfold Validation. I am using the Auto data set from the ISLR package. And I am trying to run a 10 fold validation to get 10fold crossvalidation method to calculate CV(10) for each of Models 130 for knn regression. I am coming up with NA for a CV value and I am not sure where my issues is. I have thrown in a bunch of print statements to find the different values of different variables but still can't find my issue. I believe my iterations are correct because I used print statements to validate. Still can't find where my issue is. I have run just the inner loop separately and that works.
library(ISLR) library(dplyr) library(FNN) x < Auto %>% dplyr::select(weight ,year) y < Auto$mpg n= dim(Auto)[1] nfolds=10 set.seed(2) groups = rep(1:10,length=n) tenfoldCVvalues = rep(NA,n) groups = rep(1:nfolds,length=n) # nfolds is number of folds cvgroups = sample(groups,n) k_vals = 1:30 for(iii in 1:length(k_vals)) { for (ii in 1: nfolds) { # ii is an easier string to search for index groupii = (cvgroups == ii) # logical vector for group ii trainAuto = x[!groupii,] # all data EXCEPT for group ii trainAuto.std = scale(x) # scale trainset created above trainAuto.y = y[!groupii] testAuto = x[groupii, ] # data in group ii testAuto.std = scale(testAuto, #scale test.x and store in test.x.std center = attr(trainAuto.std, "scaled:center"), scale = attr(trainAuto.std, "scaled:scale")) predictions = knn.reg(trainAuto.std, testAuto.std,trainAuto.y, k = k_vals[iii]) tenfoldCVvalues[groupii] = predictions$pred print(tenfoldCVvalues[groupii]) } y = Auto$mpg CVvalue1 = mean((y  tenfoldCVvalues)^2); } CVvalue1

Under which condition(s) can a positioning system's precision infer accuracy?
I am not sure whether this is the right forum for this question but I reckon that since it gathers experts in positioning systems, the odds of someone having valuable insights is higher than anywhere else. So here's my problem.
I have a positioning system in which the manually measured positions of objects are (for technical reasons) a common position if these objects are within a determined area. I know, it sounds weird, but bear with me. Now, on the other hand, the system regularly triangulates each object's position and returns the calculated position (planar). Hence, over time, I have a series of predicted positions for each object.
As the TRUE position is not recorded, I cannot estimate (as far as I know) the accuracy of the system. However, I still can estimate the precision since I have a large amount of readings for each object.
My question is therefore: Can I ever infer accuracy from precision for a positioning system? And if so, under which conditions?
I know this is possible in other areas of science, e.g. Medical sciences. In these cases "Accuracy may be inferred once precision, linearity and specificity have been established". Specificity tells us about the degree of interference of other systems, object and so on, as linearity of a method can be explained as its capability to show “results that are directly proportional to the concentration of the analyte in the sample” (e.g. the effect of a drug is proportional to the dose given). I fail to find any positioning equivalents to this.

BLE Beacon Indoor Positioning
I want to develop an indoor positioning to track the user's positioning by using three beacons but I have a small doubt.
Assume there can be 4 or more beacons installed in a room and how can I do the coding to Identify only three beacons?
Can someone please assist me?