#spectra=ccam.normalize(spectra,wvl,normtype=normtype) # #km=cluster.KMeans(n_clusters=k,n_init=100) #km.fit(spectra) #clusters=km.predict(spectra) # # #calculate full model ccam.pls_cal(dbfile, maskfile, outpath, which_elem, testfold, nc, normtype=normtype, mincomp=mincomp, maxcomp=maxcomp, plstype=plstype, keepfile=keepfile, removefile=removefile, cal_dir=cal_dir, masterlist_file=masterlist_file, compfile=dbfile, name_sub_file=name_sub_file, foldfile=foldfile, nfolds=nfolds) #for i in range(k): # ccam.pls_cal(dbfile,maskfile,outpath,which_elem,testfold,nc,normtype=normtype,mincomp=mincomp,maxcomp=maxcomp,plstype=plstype,keepfile=keepfile,removefile=removefile,cal_dir=cal_dir,masterlist_file=masterlist_file,compfile=dbfile,name_sub_file=name_sub_file,foldfile=foldfile,nfolds=nfolds,clusters=(clusters==i))
#calculate full model normtype = 3 removefile = 'C:\\Users\\rbanderson\\Documents\\MSL\\ChemCam\\DataProcessing\\Working\\Input\\removelist_Na2O_0-100.csv' ccam.pls_cal(dbfile, maskfile, outpath, which_elem, testfold, nc, normtype=normtype, mincomp=mincomp, maxcomp=maxcomp, plstype=plstype, keepfile=keepfile, removefile=removefile, cal_dir=cal_dir, masterlist_file=masterlist_file, compfile=dbfile, name_sub_file=name_sub_file, foldfile=foldfile, nfolds=nfolds, seed=seed, n_bag=None, n_boost=None, skscale=False) normtype = 1 ccam.pls_cal(dbfile, maskfile, outpath,
removefile = 'C:\\Users\\rbanderson\\Documents\\Projects\\MSL\\ChemCam\\DataProcessing\\Working\\Input\\removelist_SiO2_0-100.csv' #set the range of compositions in the submodel mincomp = 0 maxcomp = 100 #Set the normalization for the submodel normtype = 1 ccam.pls_cal(dbfile, maskfile, outpath, which_elem, nc, normtype=normtype, mincomp=mincomp, maxcomp=maxcomp, keepfile=keepfile, removefile=removefile, cal_dir=cal_dir, masterlist_file=masterlist_file, compfile=dbfile, name_sub_file=name_sub_file, testsetfile=testsetfile, nfolds=nfolds, seed=seed, skscale=False) #Set the normalization for the submodel normtype = 3 ccam.pls_cal(dbfile, maskfile, outpath, which_elem,